[llvm-commits] [llvm] r55016 - /llvm/trunk/test/CodeGen/X86/fast-isel.ll
Chris Lattner
clattner at apple.com
Tue Aug 19 17:38:39 PDT 2008
On Aug 19, 2008, at 3:37 PM, Dan Gohman wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=55016&view=rev
> Log:
> Fast-isel is now *minimally* functional. Add a testcase to
> demonstrate the extent of its capabilities. Note that it
> only attempts to operate on one of the blocks in this
> testcase.
Woo hoo. Please add -march=x86 to the run line though.
Also, in:
+ if (FastISel *F = TLI.createFastISel(BB, &FuncInfo.MF,
+
TLI.getTargetMachine().getInstrInfo())) {
+ BasicBlock::iterator I =
+ F->SelectInstructions(LLVMBB->begin(), LLVMBB->end(),
FuncInfo.ValueMap);
+ if (I == LLVMBB->end())
+ // The "fast" selector selected the entire block, so we're
done.
+ return;
+
+ // The "fast" selector couldn't handle something and bailed.
+ // For the temporary purpose of debugging, just abort.
+ I->dump();
+ assert(0 && "FastISel didn't select the entire block");
+ abort();
+ }
it looks like you're leaking F.
-Chris
>
>
> Added:
> llvm/trunk/test/CodeGen/X86/fast-isel.ll
>
> Added: llvm/trunk/test/CodeGen/X86/fast-isel.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel.ll?rev=55016&view=auto
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/X86/fast-isel.ll (added)
> +++ llvm/trunk/test/CodeGen/X86/fast-isel.ll Tue Aug 19 17:37:59 2008
> @@ -0,0 +1,17 @@
> +; RUN: llvm-as < %s | llc -fast-isel | grep add | count 1
> +
> +; This tests very minimal fast-isel functionality.
> +
> +define i32 @foo(i32* %p, i32* %q) {
> +entry:
> + %r = load i32* %p
> + %s = load i32* %q
> + br label %fast
> +
> +fast:
> + %t = add i32 %r, %s
> + br label %exit
> +
> +exit:
> + ret i32 %t
> +}
>
>
> _______________________________________________
> 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