[cfe-commits] r44748 - in /cfe/trunk: CodeGen/CGBuiltin.cpp CodeGen/CodeGenFunction.h Driver/PPCBuiltins.def Driver/Targets.cpp Driver/X86Builtins.def clang.xcodeproj/project.pbxproj include/clang/AST/PPCBuiltins.def include/clang/AST/X86Builtins.def
Chris Lattner
clattner at apple.com
Sun Dec 9 15:36:14 PST 2007
> URL: http://llvm.org/viewvc/llvm-project?rev=44748&view=rev
> Log:
> Move target specific builtin IDs to TargetBuiltins.h so that they
> can be used by CGBuiltin.cpp
Nice, minor nit-picks:
> +llvm::Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID,
> + const CallExpr *E)
> +{
> + switch (BuiltinID) {
> + default: return 0;
> + case X86::BI__builtin_ia32_mulps:
Please don't indent default/case like this. I know xcode is evil in
this regard, but the indentation doesn't improve readability of the
code, so I think it's best to remove it.
> + return Builder.CreateMul(EmitScalarExpr(E->getArg(0)),
> + EmitScalarExpr(E->getArg(1)),
> + "result");
Instead of "result" how about "mulps"? That would make it more clear
where it came from in the IR.
Thanks for working on this Anders!
-Chris
More information about the cfe-commits
mailing list