Commit Graph

6 Commits

Author SHA1 Message Date
Alessandro Di Federico 9c0c9995dd Improve the QueueImpl API
This commit introduces the `head` and `clear` methods for `QueueImpl`
(i.e., `UniquedQueue` and `OnceQueue`).
2017-08-12 16:56:23 +02:00
Alessandro Di Federico d01ee1f437 Copyright notices, license and credits 2016-09-21 01:45:26 +02:00
Alessandro Di Federico 46fe86225b Free memory after analyses
* Clear all the data that's not part of the analysis results at the end
  of the `runOnFunction` method
* Clear all the data that's part of the analysis results when the
  `PassManager` tells us so (`Pass::releaseMemory`)
* Do not use the `clear()` method, since it doesn't release memory
* Add some debugging information
2016-09-17 15:33:56 +02:00
Alessandro Di Federico 1254f400c3 Introduce OnceQueue
`OnceQueue` is a queue which not only keeps track of what's already in
the queue and prevents it from being re-inserted, but also keeps track
of what has ever been in the queue, and prevents it from returning to
the queue.

`OnceQueue` is implemented by adding a new template parameter to what
was once `UniquedQueue`.
2016-09-17 15:33:55 +02:00
Alessandro Di Federico 475ed2390e Introduce ConditionalReachingDefinitionsPass
Three new passes have been introduced:

* `ReachingDefinitionsPass`: classical reaching definitions analysis
  working on load/stores with the main difference that a load without a
  definition behaves similarly to a definition and that we ignore
  certain basic blocks (i.e., the dispatcher).
* `ConditionNumberingPass`: goes through all the branch instructions to
  check if some of them use an equivalent condition, this is
  particularly useful to understand that consecutive ARM instructions
  using the same predicate are working on the same condition.
* `ConditionalReachingDefinitionsPass`: identical to
  `ReachingDefinitionsPass` but uses information from
  `ConditionNumberingPass` to stop certain definitions from reaching
  certain loads.

The first and the last analyses have `Reached*` variants which expose
information from the point of view of the definintion instead of from
the point of view of the load.
2016-09-17 15:33:53 +02:00
Alessandro Di Federico d0f5944133 Factor out reusable data structures 2016-08-20 03:10:48 +02:00