[PATCH] D12923: Add support for function attribute "notail"

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 5 08:56:43 PST 2015


spatel added a subscriber: spatel.

================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:2132-2134
@@ -2131,4 +2131,5 @@
     Vals.push_back(VE.getAttributeID(CI.getAttributes()));
     Vals.push_back((CI.getCallingConv() << 1) | unsigned(CI.isTailCall()) |
-                   unsigned(CI.isMustTailCall()) << 14 | 1 << 15);
+                   unsigned(CI.isMustTailCall()) << 14 | 1 << 15 |
+                   unsigned(CI.isNoTailCall()) << 16);
     Vals.push_back(VE.getTypeID(FTy));
----------------
Hi Akira -

Can you give these bitfields proper names in a struct or enum in LLVMBitCodes.h? It took me a while to understand why we have this encoding (no code comments...).

The other reason I ask is because I was about to swipe bit 16 myself. :)

I think that's the only backwards-compatible way to add fast-math-flags to a call ( PR21290 ). We can't use the usual method of tacking an optional field to the end of the record because the record length is unknown for a call with varargs.


http://reviews.llvm.org/D12923





More information about the llvm-commits mailing list