[PATCH] Prologue support

Ben Gamari bgamari at gmail.com
Sat Nov 29 13:06:54 PST 2014


@pcc, thanks for the clarification. I believe these updates should address your concerns.

================
Comment at: lib/AsmParser/LLParser.cpp:1155
@@ +1154,3 @@
+///   ::= int32
+bool LLParser::ParseInt32(signed &Val) {
+  if (Lex.getKind() != lltok::APSInt)
----------------
pcc wrote:
> This function doesn't appear to be used.
Oh dear, yes, this must have snuck in from the previous patch that I based this upon.

================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:2072
@@ -2056,1 +2071,3 @@
         FunctionPrefixes.push_back(std::make_pair(Func, Record[10]-1));
+      if (Record.size() > 11 && Record[11] != 0)
+        FunctionPrologues.push_back(std::make_pair(Func, Record[11]-1));
----------------
pcc wrote:
> I think those who care about backwards compatibility of bitcode would prefer the new field to appear at the end.
> 
> Along the same lines, because of the change in semantics, we should store `prologue` at offset 10 and `prefix` at the end.
Sounds fine to me.

================
Comment at: test/CodeGen/X86/prefixdata.ll:6
@@ -7,2 +5,3 @@
+; CHECK: .type f, at function
 ; CHECK-NEXT: .long	1
 define void @f() prefix i32 1 {
----------------
pcc wrote:
> You could check that the function label appears after the prefix data here.
A good point.

http://reviews.llvm.org/D6454






More information about the llvm-commits mailing list