oota-llvm.git
15 years agoxfail
Devang Patel [Mon, 8 Sep 2008 16:24:30 +0000 (16:24 +0000)]
xfail

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55914 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove OptimizeIVType()
Devang Patel [Mon, 8 Sep 2008 16:13:27 +0000 (16:13 +0000)]
Remove OptimizeIVType()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55913 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDidn't mean to commit this change to how the
Duncan Sands [Mon, 8 Sep 2008 16:04:03 +0000 (16:04 +0000)]
Didn't mean to commit this change to how the
callgraph is printed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55912 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid redefinition and nnbreak windows build.
Evan Cheng [Mon, 8 Sep 2008 16:01:27 +0000 (16:01 +0000)]
Avoid redefinition and nnbreak windows build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55911 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUnbreak and fix indentation
Anton Korobeynikov [Mon, 8 Sep 2008 14:23:34 +0000 (14:23 +0000)]
Unbreak and fix indentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55904 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTestcase for 64-bit lowering of eh_return & unwind_init
Anton Korobeynikov [Mon, 8 Sep 2008 14:23:16 +0000 (14:23 +0000)]
Testcase for 64-bit lowering of eh_return & unwind_init

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55903 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd test for checking proper lowering of eh_return & unwind init intrinsics on 32bit...
Anton Korobeynikov [Mon, 8 Sep 2008 14:22:57 +0000 (14:22 +0000)]
Add test for checking proper lowering of eh_return & unwind init intrinsics on 32bit x86 targets

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55902 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDrop unused variable
Anton Korobeynikov [Mon, 8 Sep 2008 14:22:38 +0000 (14:22 +0000)]
Drop unused variable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55901 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWe do support EH on x86-64!
Anton Korobeynikov [Mon, 8 Sep 2008 14:22:16 +0000 (14:22 +0000)]
We do support EH on x86-64!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55900 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFirst draft of EH support on x86/64-linux
Anton Korobeynikov [Mon, 8 Sep 2008 14:21:53 +0000 (14:21 +0000)]
First draft of EH support on x86/64-linux

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55899 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement FRAME_TO_ARGS_OFFSET for x86-64
Anton Korobeynikov [Mon, 8 Sep 2008 14:21:10 +0000 (14:21 +0000)]
Implement FRAME_TO_ARGS_OFFSET for x86-64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55898 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd testcase from bug 2770.
Rafael Espindola [Mon, 8 Sep 2008 11:17:54 +0000 (11:17 +0000)]
Add testcase from bug 2770.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55897 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate the callgraph correctly.
Duncan Sands [Mon, 8 Sep 2008 11:08:09 +0000 (11:08 +0000)]
Update the callgraph correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55896 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate the callgraph correctly in ArgumentPromotion.
Duncan Sands [Mon, 8 Sep 2008 11:07:35 +0000 (11:07 +0000)]
Update the callgraph correctly in ArgumentPromotion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55895 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReapply 55859. This doesn't change anything as
Duncan Sands [Mon, 8 Sep 2008 11:05:51 +0000 (11:05 +0000)]
Reapply 55859.  This doesn't change anything as
long as the callgraph is correct.  It checks
for wrong callgraphs more strictly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55894 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCorrectly handle physical register inputs. They are not explicit input operands in...
Evan Cheng [Mon, 8 Sep 2008 08:39:33 +0000 (08:39 +0000)]
Correctly handle physical register inputs. They are not explicit input operands in the resulting machine instrs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55893 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd fast isel physical register definition support.
Evan Cheng [Mon, 8 Sep 2008 08:38:20 +0000 (08:38 +0000)]
Add fast isel physical register definition support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55892 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support to extend call operands when needed. Enable x86 fastisel call support.
Evan Cheng [Mon, 8 Sep 2008 06:35:17 +0000 (06:35 +0000)]
Add support to extend call operands when needed. Enable x86 fastisel call support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55891 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert my previous change -- the subtraction of two constants was a no-op
Bill Wendling [Mon, 8 Sep 2008 01:56:32 +0000 (01:56 +0000)]
Revert my previous change -- the subtraction of two constants was a no-op
before. This is taken care of in the selection DAG pass. In my opinion, this
should be in one place or the other. I.e., it should probably be removed from
the DAG combiner (along with the other arithmetic transformations on constants
that are essentially no-ops).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55889 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert
Bill Wendling [Sun, 7 Sep 2008 11:34:47 +0000 (11:34 +0000)]
Convert

    // fold (sub c1, c2) -> c1-c2

from a no-op into an actual transformation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55886 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClean up CSS validator errors: 'Property align doesn't exist : center'
Bill Wendling [Sun, 7 Sep 2008 10:29:20 +0000 (10:29 +0000)]
Clean up CSS validator errors: 'Property align doesn't exist : center'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55885 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFormatting changes. to make the information cleaner.
Bill Wendling [Sun, 7 Sep 2008 10:26:33 +0000 (10:26 +0000)]
Formatting changes. to make the information cleaner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55884 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCorrect a comment and strip trailing whitespace.
Duncan Sands [Sun, 7 Sep 2008 09:54:09 +0000 (09:54 +0000)]
Correct a comment and strip trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55883 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitial fastisel call support for C, Fast, and X86_FastCall calling conventions....
Evan Cheng [Sun, 7 Sep 2008 09:09:33 +0000 (09:09 +0000)]
Initial fastisel call support for C, Fast, and X86_FastCall calling conventions. It's meant to handle "simple" calls, i.e. no byval, structret, etc. It doesn't support multi-result returns either.

Not yet turned on, it needs to support sext / zext of arguments and result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55882 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome code clean up.
Evan Cheng [Sun, 7 Sep 2008 09:07:23 +0000 (09:07 +0000)]
Some code clean up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55881 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIndentation.
Evan Cheng [Sun, 7 Sep 2008 09:04:52 +0000 (09:04 +0000)]
Indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55880 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- Doh. Pass vector by value is bad.
Evan Cheng [Sun, 7 Sep 2008 09:02:18 +0000 (09:02 +0000)]
- Doh. Pass vector by value is bad.
- Add a AnalyzeCallResult specialized for calls which produce a single value. This is used by fastisel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55879 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEliminate a compile time warning.
Evan Cheng [Sun, 7 Sep 2008 09:00:57 +0000 (09:00 +0000)]
Eliminate a compile time warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55878 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHandle x86 truncate to i8 with target hook for now.
Evan Cheng [Sun, 7 Sep 2008 08:47:42 +0000 (08:47 +0000)]
Handle x86 truncate to i8 with target hook for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55877 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix indentation of generated code.
Evan Cheng [Sun, 7 Sep 2008 08:23:06 +0000 (08:23 +0000)]
Fix indentation of generated code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55876 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIgnore multi-instruction patterns. e.g.
Evan Cheng [Sun, 7 Sep 2008 08:19:51 +0000 (08:19 +0000)]
Ignore multi-instruction patterns. e.g.
def : Pat<(i8 (trunc GR32:$src)),
          (i8 (EXTRACT_SUBREG (MOV32to32_ GR32:$src), x86_subreg_8bit))>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55875 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix crash when the malloc/free function is defined or is a declaration with 0 parameters.
Nuno Lopes [Sat, 6 Sep 2008 17:44:06 +0000 (17:44 +0000)]
fix crash when the malloc/free function is defined or is a declaration with 0 parameters.
this pass doesnt seem to be used, but still it's now a little more correct

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55873 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen PruneEH turned an invoke into an ordinary
Duncan Sands [Sat, 6 Sep 2008 17:19:29 +0000 (17:19 +0000)]
When PruneEH turned an invoke into an ordinary
call (thus changing the call site) it didn't
inform the callgraph about this.  But the
call site does matter - as shown by the testcase,
the callgraph become invalid after the inliner
ran (with an edge between two functions simply
missing), resulting in wrong deductions by
GlobalsModRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55872 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix constant pool loads, and remove broken versions of addConstantPoolReference.
Owen Anderson [Sat, 6 Sep 2008 01:11:01 +0000 (01:11 +0000)]
Fix constant pool loads, and remove broken versions of addConstantPoolReference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55868 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the X86 addConstantPoolReference, which had the operands in the wrong order.
Owen Anderson [Sat, 6 Sep 2008 00:50:00 +0000 (00:50 +0000)]
Fix the X86 addConstantPoolReference, which had the operands in the wrong order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55867 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNext limited float precision expansion (log2 12 bits)
Dale Johannesen [Fri, 5 Sep 2008 23:49:37 +0000 (23:49 +0000)]
Next limited float precision expansion (log2 12 bits)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55866 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r55859. This is breaking the build in the abscence of its companion commit.
Owen Anderson [Fri, 5 Sep 2008 23:36:01 +0000 (23:36 +0000)]
Revert r55859.  This is breaking the build in the abscence of its companion commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55865 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix for PR2687: Add patterns to match sint_to_fp and fp_to_sint for <2 x
Eli Friedman [Fri, 5 Sep 2008 23:07:03 +0000 (23:07 +0000)]
Fix for PR2687: Add patterns to match sint_to_fp and fp_to_sint for <2 x
i32>.  This is a little messy, but it works.

We should really get rid of the intrinsics, though, since they map
perfectly well to standard LLVM instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55864 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove the code that inserts copies for function livein registers
Dan Gohman [Fri, 5 Sep 2008 22:59:21 +0000 (22:59 +0000)]
Move the code that inserts copies for function livein registers
out of ScheduleDAGEmit.cpp and into SelectionDAGISel.cpp. This
allows it to be run exactly once per function, even if multiple
SelectionDAG iterations happen in the entry block, as may happen
with FastISel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55863 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove unused map.
Devang Patel [Fri, 5 Sep 2008 21:55:33 +0000 (21:55 +0000)]
Remove unused map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55861 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMark math lib intrinsics readonly, on the grounds
Dale Johannesen [Fri, 5 Sep 2008 21:49:30 +0000 (21:49 +0000)]
Mark math lib intrinsics readonly, on the grounds
that they read the rounding mode.  This is conservatively
correct, which they weren't before.  We can do more
optimization on these if we actually model the rounding
mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55860 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDelete the removeCallEdgeTo callgraph method,
Duncan Sands [Fri, 5 Sep 2008 21:43:04 +0000 (21:43 +0000)]
Delete the removeCallEdgeTo callgraph method,
because it does not maintain a correct list
of callsites.  I discovered (see following
commit) that the inliner will create a wrong
callgraph if it is fed a callgraph with
correct edges but incorrect callsites.  These
were created by Prune-EH, and while it wasn't
done via removeCallEdgeTo, it could have been
done via removeCallEdgeTo, which is an accident
waiting to happen.  Use removeCallEdgeFor
instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55859 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrevent our own passes from promoting this to
Duncan Sands [Fri, 5 Sep 2008 21:34:32 +0000 (21:34 +0000)]
Prevent our own passes from promoting this to
readonly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55858 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix X86FastISel's shift and select code to reject illegal types.
Dan Gohman [Fri, 5 Sep 2008 21:27:34 +0000 (21:27 +0000)]
Fix X86FastISel's shift and select code to reject illegal types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55857 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd the next limited-precision expansion.
Dale Johannesen [Fri, 5 Sep 2008 21:27:19 +0000 (21:27 +0000)]
Add the next limited-precision expansion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55856 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the opcodes used by X86FastISel for shifts and conditional moves.
Dan Gohman [Fri, 5 Sep 2008 21:13:04 +0000 (21:13 +0000)]
Fix the opcodes used by X86FastISel for shifts and conditional moves.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55855 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor out code that emits load and store instructions.
Evan Cheng [Fri, 5 Sep 2008 21:00:03 +0000 (21:00 +0000)]
Factor out code that emits load and store instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55854 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename method.
Owen Anderson [Fri, 5 Sep 2008 20:49:33 +0000 (20:49 +0000)]
Rename method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55853 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix test.
Evan Cheng [Fri, 5 Sep 2008 20:04:37 +0000 (20:04 +0000)]
Fix test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55849 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFastISel support for AND and OR with type i1.
Dan Gohman [Fri, 5 Sep 2008 18:44:22 +0000 (18:44 +0000)]
FastISel support for AND and OR with type i1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55846 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd hooks for other intrinsics to get low-precision expansions.
Dale Johannesen [Fri, 5 Sep 2008 18:38:42 +0000 (18:38 +0000)]
Add hooks for other intrinsics to get low-precision expansions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55845 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoX86FastISel support for shifts and conditional moves.
Dan Gohman [Fri, 5 Sep 2008 18:30:08 +0000 (18:30 +0000)]
X86FastISel support for shifts and conditional moves.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55844 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFastISel support for ConstantExprs.
Dan Gohman [Fri, 5 Sep 2008 18:18:20 +0000 (18:18 +0000)]
FastISel support for ConstantExprs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55843 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r55817. It broke PIC. FastISel will need to find a different
Dan Gohman [Fri, 5 Sep 2008 18:13:01 +0000 (18:13 +0000)]
Revert r55817. It broke PIC. FastISel will need to find a different
approach here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55842 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf SSE2 is available, x86 should pass first 3 f32/f64 arguments in XMM registers...
Evan Cheng [Fri, 5 Sep 2008 17:24:07 +0000 (17:24 +0000)]
If SSE2 is available, x86 should pass first 3 f32/f64 arguments in XMM registers for fastcc calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55840 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a variant of AnalyzeCallOperands that can be used by fast isel.
Evan Cheng [Fri, 5 Sep 2008 16:59:26 +0000 (16:59 +0000)]
Add a variant of AnalyzeCallOperands that can be used by fast isel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55838 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse removeAllCalledFunctions rather than removing
Duncan Sands [Fri, 5 Sep 2008 14:56:53 +0000 (14:56 +0000)]
Use removeAllCalledFunctions rather than removing
edges one by one by hand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55836 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove trailing whitespace.
Duncan Sands [Fri, 5 Sep 2008 12:37:12 +0000 (12:37 +0000)]
Remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55835 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStrip trailing whitespace.
Duncan Sands [Fri, 5 Sep 2008 12:31:56 +0000 (12:31 +0000)]
Strip trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55834 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake this pass return that it made a change if
Duncan Sands [Fri, 5 Sep 2008 09:08:37 +0000 (09:08 +0000)]
Make this pass return that it made a change if
it modifies a functions attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55831 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago"Fix" PR2762. The testcase now crashes codegen
Duncan Sands [Fri, 5 Sep 2008 08:13:35 +0000 (08:13 +0000)]
"Fix" PR2762.  The testcase now crashes codegen
elsewhere due to a missing pattern for
v2f64 = sint_to_fp v2i32.  That is PR2687.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55828 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a search+replace-o.
Dan Gohman [Fri, 5 Sep 2008 01:58:21 +0000 (01:58 +0000)]
Fix a search+replace-o.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55824 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd -flimit-float-precision to enable some faster,
Dale Johannesen [Fri, 5 Sep 2008 01:48:15 +0000 (01:48 +0000)]
Add -flimit-float-precision to enable some faster,
but less accurate (non-IEEE) code sequences for
certain math library functions.  Add the first of
several such expansions.  Don't worry, if you don't
turn it on it won't affect you.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55823 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCheck a comparion's operand type for legality before
Dan Gohman [Fri, 5 Sep 2008 01:33:56 +0000 (01:33 +0000)]
Check a comparion's operand type for legality before
expanding its operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55820 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix X86FastISel code for comparisons and conditional branches
Dan Gohman [Fri, 5 Sep 2008 01:15:35 +0000 (01:15 +0000)]
Fix X86FastISel code for comparisons and conditional branches
to check the result of getRegForValue before using it, and
to check for illegal operand types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55819 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFastISel support for unreachable.
Dan Gohman [Fri, 5 Sep 2008 01:08:41 +0000 (01:08 +0000)]
FastISel support for unreachable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55818 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIn FastISel mode, the scheduler may be invoked multiple times
Dan Gohman [Fri, 5 Sep 2008 01:07:48 +0000 (01:07 +0000)]
In FastISel mode, the scheduler may be invoked multiple times
in the same block. Fix the entry-block handling to only run at
at the beginning of the entry block, and not any other times.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55817 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoX86FastISel support for conditional branches.
Dan Gohman [Fri, 5 Sep 2008 01:06:14 +0000 (01:06 +0000)]
X86FastISel support for conditional branches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55816 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd initial support for selecting constant materializations that require constant
Owen Anderson [Fri, 5 Sep 2008 00:06:23 +0000 (00:06 +0000)]
Add initial support for selecting constant materializations that require constant
pool loads on X86 in fast isel.  This isn't actually used yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55814 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoX86FastISel support for ICmpInst and FCmpInst.
Dan Gohman [Thu, 4 Sep 2008 23:26:51 +0000 (23:26 +0000)]
X86FastISel support for ICmpInst and FCmpInst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55811 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoupdate.
Devang Patel [Thu, 4 Sep 2008 23:10:26 +0000 (23:10 +0000)]
update.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55809 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDocument function notes.
Devang Patel [Thu, 4 Sep 2008 23:05:13 +0000 (23:05 +0000)]
Document function notes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55808 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFor whatever the reason, x86 CallingConv::Fast (i.e. fastcc) was not passing scalar...
Evan Cheng [Thu, 4 Sep 2008 22:59:58 +0000 (22:59 +0000)]
For whatever the reason, x86 CallingConv::Fast (i.e. fastcc) was not passing scalar arguments in registers. This patch defines a new fastcc CC which is slightly different from the FastCall CC. In addition to passing integer arguments in ECX and EDX, it also specify doubles are passed in 8-byte slots which are 8-byte aligned (instead of 4-byte aligned). This avoids a potential performance hazard where doubles span cacheline boundaries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55807 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoA loop may be unswitched multiple times. Reconstruct dom info. at the end.
Devang Patel [Thu, 4 Sep 2008 22:43:59 +0000 (22:43 +0000)]
A loop may be unswitched multiple times. Reconstruct dom info. at the end.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55806 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdjust tests to expect new math intrinsics to be
Dale Johannesen [Thu, 4 Sep 2008 21:24:28 +0000 (21:24 +0000)]
Adjust tests to expect new math intrinsics to be
emitted only when errno is not in use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55797 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf function notes say optimize for size, then adjust alignment.
Devang Patel [Thu, 4 Sep 2008 21:03:41 +0000 (21:03 +0000)]
If function notes say optimize for size, then adjust alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55794 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd an include of SmallSet.h.
Dan Gohman [Thu, 4 Sep 2008 20:49:27 +0000 (20:49 +0000)]
Add an include of SmallSet.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55793 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitialize loop data first.
Devang Patel [Thu, 4 Sep 2008 20:36:36 +0000 (20:36 +0000)]
Initialize loop data first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55792 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNeaten this up a bit. No functionality change.
Duncan Sands [Thu, 4 Sep 2008 19:16:20 +0000 (19:16 +0000)]
Neaten this up a bit.  No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55789 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not unswitch if the function notes say we're optimizing this function for size.
Devang Patel [Thu, 4 Sep 2008 18:55:13 +0000 (18:55 +0000)]
Do not unswitch if the function notes say we're optimizing this function for size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55786 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotry to seperate the mechanism into something others can use
Andrew Lenharth [Thu, 4 Sep 2008 18:51:26 +0000 (18:51 +0000)]
try to seperate the mechanism into something others can use

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55785 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdjust libcalls tests to expect intrinsic for exp2
Dale Johannesen [Thu, 4 Sep 2008 18:44:20 +0000 (18:44 +0000)]
Adjust libcalls tests to expect intrinsic for exp2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55784 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd intrinsic forms of pow and exp2. The non-intrinsic
Dale Johannesen [Thu, 4 Sep 2008 18:30:46 +0000 (18:30 +0000)]
Add intrinsic forms of pow and exp2.  The non-intrinsic
forms remain to handle older IR files, but will go away soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55781 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTidy up several unbeseeming casts from pointer to intptr_t.
Dan Gohman [Thu, 4 Sep 2008 17:05:41 +0000 (17:05 +0000)]
Tidy up several unbeseeming casts from pointer to intptr_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the ordering of operands to the store (inverted relative to LLVM IR), and fix...
Owen Anderson [Thu, 4 Sep 2008 16:48:33 +0000 (16:48 +0000)]
Fix the ordering of operands to the store (inverted relative to LLVM IR), and fix the testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55777 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClean up uses of TargetLowering::getTargetMachine.
Dan Gohman [Thu, 4 Sep 2008 15:39:15 +0000 (15:39 +0000)]
Clean up uses of TargetLowering::getTargetMachine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55769 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agocleanup as per Duncan's review
Andrew Lenharth [Thu, 4 Sep 2008 14:34:22 +0000 (14:34 +0000)]
cleanup as per Duncan's review

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55766 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a first attempt at implementing stores for X86 fast isel using target hooks.
Owen Anderson [Thu, 4 Sep 2008 07:08:58 +0000 (07:08 +0000)]
Add a first attempt at implementing stores for X86 fast isel using target hooks.
Dan or Evan, please review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55764 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLoad from GV stub should be locally CSE'd.
Evan Cheng [Thu, 4 Sep 2008 06:18:33 +0000 (06:18 +0000)]
Load from GV stub should be locally CSE'd.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55763 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix an overly strict assertion. Source register of a copy may not be killed, it may...
Evan Cheng [Thu, 4 Sep 2008 05:43:55 +0000 (05:43 +0000)]
Fix an overly strict assertion. Source register of a copy may not be killed, it may be killed by an implicit super-register use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55762 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove code that pad number of bytes to pop for X86_FastCall CC. The code doesn't...
Evan Cheng [Thu, 4 Sep 2008 01:04:15 +0000 (01:04 +0000)]
Remove code that pad number of bytes to pop for X86_FastCall CC. The code doesn't do the "aligning" for Cygwin, Mingw, and Windows. But aligning it on Darwin and Linux breaks gcc compatibility. That ruled out all the platforms we support!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55756 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd intrinsics for log, log2, log10, exp, exp2.
Dale Johannesen [Thu, 4 Sep 2008 00:47:13 +0000 (00:47 +0000)]
Add intrinsics for log, log2, log10, exp, exp2.
No functional change (and no FE change to generate them).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55753 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo trivial local CSE for constants and other non-Instruction values
Dan Gohman [Wed, 3 Sep 2008 23:32:19 +0000 (23:32 +0000)]
Do trivial local CSE for constants and other non-Instruction values
in FastISel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55748 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPut RegsForValue in the llvm namespace to avoid warnings about
Dan Gohman [Wed, 3 Sep 2008 23:18:39 +0000 (23:18 +0000)]
Put RegsForValue in the llvm namespace to avoid warnings about
classes in the llvm namespace having members with types from
anonymous namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55747 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCreate HandlePHINodesInSuccessorBlocksFast, a version of
Dan Gohman [Wed, 3 Sep 2008 23:12:08 +0000 (23:12 +0000)]
Create HandlePHINodesInSuccessorBlocksFast, a version of
HandlePHINodesInSuccessorBlocks that works FastISel-style. This
allows PHI nodes to be updated correctly while using FastISel.

This also involves some code reorganization; ValueMap and
MBBMap are now members of the FastISel class, so they needn't
be passed around explicitly anymore. Also, SelectInstructions
is changed to SelectInstruction, and only does one instruction
at a time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55746 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate inline threshold for current function if the notes say, optimize for size.
Devang Patel [Wed, 3 Sep 2008 23:06:09 +0000 (23:06 +0000)]
Update inline threshold for current function if the notes say, optimize for size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55745 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a bug that prevented PRE from applying in some cases.
Owen Anderson [Wed, 3 Sep 2008 23:06:07 +0000 (23:06 +0000)]
Fix a bug that prevented PRE from applying in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55744 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid extra comma.
Devang Patel [Wed, 3 Sep 2008 22:55:40 +0000 (22:55 +0000)]
Avoid extra comma.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55742 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoParse and print opt_size note.
Devang Patel [Wed, 3 Sep 2008 22:10:21 +0000 (22:10 +0000)]
Parse and print opt_size note.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55740 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitial version of a Partial Specialization IPO pass. It triggers a couple hundred...
Andrew Lenharth [Wed, 3 Sep 2008 21:00:28 +0000 (21:00 +0000)]
Initial version of a Partial Specialization IPO pass.  It triggers a couple hundred times on 176.gcc.  I don't know the performance impact yet, the heuristic is quite simple still.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55734 91177308-0d34-0410-b5e6-96231b3b80d8