diff options
| author | Jack Koenig | 2018-10-31 14:59:40 -0700 |
|---|---|---|
| committer | Jack Koenig | 2018-10-31 15:22:26 -0700 |
| commit | 9bc2e6daaf3a3a08aefe485aa924c820689de981 (patch) | |
| tree | 5626a130bc1607e6a4c68eec864b7944f3a322e8 /src/main/scala/firrtl/Utils.scala | |
| parent | 8d599182114306f77d098ba7effa836328b1e802 (diff) | |
Remove all uses of get_flip and deprecate
It is O(n) and every use is in an O(n) iteration resulting in O(n^2).
Same information can be extracted from create_exps which happens to also
be called at every use of get_flip.
Diffstat (limited to 'src/main/scala/firrtl/Utils.scala')
| -rw-r--r-- | src/main/scala/firrtl/Utils.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/Utils.scala b/src/main/scala/firrtl/Utils.scala index 53e8c157..44b16bf8 100644 --- a/src/main/scala/firrtl/Utils.scala +++ b/src/main/scala/firrtl/Utils.scala @@ -300,6 +300,7 @@ object Utils extends LazyLogging { onExp(expression) ReferenceTarget(main, module, Nil, ref, tokens) } + @deprecated("get_flip is fundamentally slow, use to_flip(gender(expr))", "1.2") def get_flip(t: Type, i: Int, f: Orientation): Orientation = { if (i >= get_size(t)) throwInternalError(s"get_flip: shouldn't be here - $i >= get_size($t)") t match { |
