-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[X86] [NewPM] Add New Pass Manager wiring for x86-avoid-trailing-call #166723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
88710c5
0ba4ae2
03ee9f2
e355529
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -14,6 +14,7 @@ | |||||
| #ifndef LLVM_LIB_TARGET_X86_X86_H | ||||||
| #define LLVM_LIB_TARGET_X86_X86_H | ||||||
|
|
||||||
| #include "llvm/CodeGen/MachineFunctionAnalysisManager.h" | ||||||
| #include "llvm/IR/Analysis.h" | ||||||
| #include "llvm/IR/PassManager.h" | ||||||
| #include "llvm/Support/CodeGen.h" | ||||||
|
|
@@ -104,7 +105,19 @@ FunctionPass *createX86LowerTileCopyPass(); | |||||
| /// CALL instruction. The pass does the same for each funclet as well. This | ||||||
| /// ensures that the open interval of function start and end PCs contains all | ||||||
| /// return addresses for the benefit of the Windows x64 unwinder. | ||||||
| FunctionPass *createX86AvoidTrailingCallPass(); | ||||||
| class X86AvoidTrailingCallPass | ||||||
| : public PassInfoMixin<X86AvoidTrailingCallPass> { | ||||||
| private: | ||||||
| const TargetMachine *TM; | ||||||
|
|
||||||
| public: | ||||||
| X86AvoidTrailingCallPass(const TargetMachine *TM) : TM(TM) {} | ||||||
|
||||||
| X86AvoidTrailingCallPass(const TargetMachine *TM) : TM(TM) {} | |
| X86AvoidTrailingCallPass(const X86TargetMachine *TM) : TM(TM) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Done.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,13 +30,13 @@ DUMMY_FUNCTION_PASS("x86-winehstate", WinEHStatePass()) | |
| #define MACHINE_FUNCTION_PASS(NAME, CREATE_PASS) | ||
| #endif | ||
| MACHINE_FUNCTION_PASS("x86-isel", X86ISelDAGToDAGPass(*this)) | ||
| MACHINE_FUNCTION_PASS("x86-avoid-trailing-call", X86AvoidTrailingCallPass(this)) | ||
|
||
| #undef MACHINE_FUNCTION_PASS | ||
|
|
||
| #ifndef DUMMY_MACHINE_FUNCTION_PASS | ||
| #define DUMMY_MACHINE_FUNCTION_PASS(NAME, PASS_NAME) | ||
| #endif | ||
| DUMMY_MACHINE_FUNCTION_PASS("x86-avoid-SFB", X86AvoidSFBPass()) | ||
| DUMMY_MACHINE_FUNCTION_PASS("x86-avoid-trailing-call", X86AvoidTrailingCallPass()) | ||
| DUMMY_MACHINE_FUNCTION_PASS("x86-cf-opt", X86CallFrameOptimization()) | ||
| DUMMY_MACHINE_FUNCTION_PASS("x86-cmov-conversion", X86CmovConverterPass()) | ||
| DUMMY_MACHINE_FUNCTION_PASS("x86-codege", FPS()) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Done.