[PATCH] D19046: Introduce a "patchable-prologue" function attribute
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 13 11:07:29 PDT 2016
rnk added inline comments.
================
Comment at: include/llvm/Target/TargetLowering.h:1805
@@ +1804,3 @@
+ virtual void
+ makeFunctionProloguePatchable(MachineFunction &MF,
+ PatchablePrologueFlavor PPF) const {
----------------
This is about the prologue, so I would put this in TargetFrameLowering / X86FrameLowering, rather than growing the massive TargetLowering interface.
================
Comment at: include/llvm/Target/TargetLowering.h:1807
@@ +1806,3 @@
+ PatchablePrologueFlavor PPF) const {
+ llvm_unreachable("Not implemented for this target!");
+ }
----------------
This file is not consistent on this point, but this should be report_fatal_error, since we want to keep the message in release builds.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:30642
@@ +30641,3 @@
+ case X86::SUB64ri32:
+ // We know this instruction takes more than two bytes.
+ break;
----------------
I guess we are confident that modifying an instruction during its execution is not problematic.
http://reviews.llvm.org/D19046
More information about the llvm-commits
mailing list