[llvm] [LLVM][TableGen] Change DAGISel code to use const RecordKeeper (PR #109038)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 18 04:54:12 PDT 2024
================
@@ -132,7 +132,8 @@ struct PatternSortingPredicate {
} // End anonymous namespace
void DAGISelEmitter::run(raw_ostream &OS) {
- Records.startTimer("Parse patterns");
+ RecordKeeper &MutableRC = const_cast<RecordKeeper &>(Records);
----------------
jurahul wrote:
Ideally, I am thinking we should end up in a state like:
```
class TGContext {
const RecordModule &getRecords() const;
TGTimers &getTimers().
};
```
so we have a TGContext as the TG backend inputs and we rename `RecordKeeper` to `RecordModule`. I might take that up after this current refactor is done (of having better const correctness).
https://github.com/llvm/llvm-project/pull/109038
More information about the llvm-commits
mailing list