Need to add a simple test for the canonizer. Also adding some helper functions that a couple new features that another patch will use.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I've commented on both parts, but please keep each review to a single topic. Adding the test is one thing, and adding the helpers should be another review (or better yet, just add them when you use them).
lib/CodeGen/MIRCanonicalizerPass.cpp | ||
---|---|---|
102–106 | These macros don't expand to expressions - adding semicolons doesn't make much sense. | |
134 | Should this be static? | |
145–146 | I think we usually put raw_string_ostream stuff in its own block to ensure it flushes or something. Please check other uses to see if this is right. | |
150 | Spelling out the type is clearer than auto here, though it might be simpler still to use StringRef::split or StringRef::take_until instead. | |
152 | I'm pretty sure we can do StringInstrMap.insert({Str, II}) and avoid the StringMapEntry typedef here. If not, std::make_pair is probably what we want. | |
173 | Range-for probably cleans this up a bit. | |
test/CodeGen/MIR/AArch64/mirCanonTest1.mir | ||
14–35 | You should be able to remove the whole IR block here, it isn't really relevant to the test. You'll need to add -mtriple to the llc command. | |
38–67 | I think you can get away with removing all of this metadata. | |
69 | You'll need to drop the names from these to get rid of the IR. | |
99 | Without IR this will presumably read STRXui %0, %stack.1, 0 :: (store 8) |
These macros don't expand to expressions - adding semicolons doesn't make much sense.