[cfe-commits] [llvm-commits] The AArch64 LLVM (& Clang) target
Tim Northover
t.p.northover at gmail.com
Mon Jan 7 14:06:44 PST 2013
Hi Sean,
On Mon, Jan 7, 2013 at 9:17 PM, Sean Silva <silvas at purdue.edu> wrote:
> This is awesome! What kinds of code have you compiled with it?
We're somewhere around "lots of code" but well short of "an entire
distribution". Notable things we can compile successfully:
+ Clang itself
+ SPEC2000 & SPEC2006 (includes weird and wonderful mathematical
code, as well as some more well-known software: gcc, perl, bzip2,
povray off the top of my head).
+ PlumHall (not really that much of a test, but never mind).
> Some small "peephole" comments about the patches:
Thanks! Anything you pick up should make it a better backend.
> +static TypedefDecl *
> +CreateAArch64ABIBuiltinVaListDecl(const ASTContext *Context) {
>
> You are creating new types in here, which modifies the ASTContext, so
> it's not really correct to take it as const (as evidenced by the uses
> of const_cast's in this function).
This appears to be necessary: at least, all other
CreateXXXABIBuiltinVaListDecl functions do the same and call-sites
only appear to have a const version handy.
> <http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return>.
> <http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code>
I'll take a look at these. Thanks.
> + assert(0 && "Can't handle nested target expr!");
> use llvm_unreachable()
Will do. I suspect I "inherited" that code from other backends, but it
could well have been when I was still confused myself too.
Cheers.
Tim.
More information about the cfe-commits
mailing list