[llvm-commits] [llvm] r51904 - /llvm/trunk/lib/CodeGen/AsmPrinter.cpp
Chris Lattner
clattner at apple.com
Tue Jun 3 09:29:03 PDT 2008
> URL: http://llvm.org/viewvc/llvm-project?rev=51904&view=rev
> Log:
> Find a better place to output hex constants corresponding to integers.
Hey Scott, how much does this affect -O0 compile times? Doing at
least one extra malloc/free is very bad for each constant.
-Chris
>
>
> Modified:
> llvm/trunk/lib/CodeGen/AsmPrinter.cpp
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter.cpp?rev=51904&r1=51903&r2=51904&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter.cpp Tue Jun 3 10:39:51 2008
> @@ -1074,6 +1074,11 @@
> const Type *type = CV->getType();
> printDataDirective(type);
> EmitConstantValueOnly(CV);
> + if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
> + O << "\t\t\t"
> + << TAI->getCommentString()
> + << " 0x" << CI->getValue().toStringUnsigned(16);
> + }
> O << "\n";
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list