Chris Lattner
46ade282c8
Make FunctionPass::getFunction() return a reference to the function, instead of
...
a pointer. This makes it consistent with all the other methods in
FunctionPass, as well as with ModulePass::getModule(). NFC.
PiperOrigin-RevId: 240257910
2019-03-29 17:40:44 -07:00
Uday Bondhugula
02af8c22df
Change Pass:getFunction() to return pointer instead of ref - NFC
...
- change this for consistency - everything else similar takes/returns a
Function pointer - the FuncBuilder ctor,
Block/Value/Instruction::getFunction(), etc.
- saves a whole bunch of &s everywhere
PiperOrigin-RevId: 236928761
2019-03-29 16:58:35 -07:00
River Riddle
ed5fe2098b
Remove PassResult and have the runOnFunction/runOnModule functions return void instead. To signal a pass failure, passes should now invoke the 'signalPassFailure' method. This provides the equivalent functionality when needed, but isn't an intrusive part of the API like PassResult.
...
PiperOrigin-RevId: 236202029
2019-03-29 16:50:44 -07:00
River Riddle
c6c534493d
Port all of the existing passes over to the new pass manager infrastructure. This is largely NFC.
...
PiperOrigin-RevId: 235952357
2019-03-29 16:47:14 -07:00
River Riddle
3e656599f1
Define a PassID class to use when defining a pass. This allows for the type used for the ID field to be self documenting. It also allows for the compiler to know the set alignment of the ID object, which is useful for storing pointer identifiers within llvm data structures.
...
PiperOrigin-RevId: 235107957
2019-03-29 16:37:12 -07:00
River Riddle
48ccae2476
NFC: Refactor the files related to passes.
...
* PassRegistry is split into its own source file.
* Pass related files are moved to a new library 'Pass'.
PiperOrigin-RevId: 234705771
2019-03-29 16:32:56 -07:00
River Riddle
a3d9ccaecb
Replace the walkOps/visitOperationInst variants from the InstWalkers with the Instruction variants.
...
PiperOrigin-RevId: 232322030
2019-03-29 16:10:24 -07:00
River Riddle
de2d0dfbca
Fold the functionality of OperationInst into Instruction. OperationInst still exists as a forward declaration and will be removed incrementally in a set of followup cleanup patches.
...
PiperOrigin-RevId: 232198540
2019-03-29 16:09:19 -07:00
River Riddle
b6928c945c
Standardize the spelling of debug info to "debuginfo" in opt flags.
...
PiperOrigin-RevId: 231610337
2019-03-29 16:02:38 -07:00
River Riddle
f319bbbd28
Add a function pass to strip debug info from functions and instructions.
...
PiperOrigin-RevId: 230654315
2019-03-29 15:33:50 -07:00