Commit Graph

30685 Commits

Author SHA1 Message Date
Evan Cheng c1b21857a4 If target decides to create an emergency spill slot, make sure it's closest to SP or frame pointer.
llvm-svn: 34965
2007-03-06 10:02:38 +00:00
Evan Cheng 372c2c69f8 Register scavenger is now capable of scavenging. It spills a register whose use of furthest away to make it available.
llvm-svn: 34964
2007-03-06 10:01:25 +00:00
Anton Korobeynikov e7ec3bc7bc Use new SDIselParamAttr enumeration. This removes "magick" constants
from formal attributes' flags processing.

llvm-svn: 34963
2007-03-06 08:12:33 +00:00
Chris Lattner 70c3c66e38 temporarily disable this until Reid has a chance to fix it.
llvm-svn: 34962
2007-03-06 07:30:03 +00:00
Chris Lattner 40872ad006 llvm-gcc 3.4 is dead.
llvm-svn: 34961
2007-03-06 06:27:34 +00:00
Anton Korobeynikov f0b9316552 Enumerate SDISel formal parameter attributes. Make use of new
enumeration.

llvm-svn: 34960
2007-03-06 06:10:33 +00:00
Anton Korobeynikov 666d23d4e6 Implement PR1240
llvm-svn: 34959
2007-03-06 05:32:48 +00:00
Reid Spencer 4e42790c43 1. Make StoreValueToMemory a little more efficient by not requiring caller
to make a copy of the GenericValue.
2. Fix a copy & paste bug in StoreValueToMemory where 64-bit values were
   truncated to 32

llvm-svn: 34958
2007-03-06 05:03:16 +00:00
Reid Spencer d7c6174f85 Make StoreValueToMemory a little more efficient by not copying a
GenericValue to a temporary.

llvm-svn: 34957
2007-03-06 05:02:28 +00:00
Reid Spencer 1efc4aaf84 Fix some thinko's in the last patch. PtrSize has to be in bits and we
might need to zext not just trunc the value.

llvm-svn: 34955
2007-03-06 03:46:41 +00:00
Reid Spencer 10dbc1e896 Fix a bug in IntToPtr. Truncating to 64-bits only works if the integer
is larger. Adjust so that it truncates to pointer width, only if necessary.

llvm-svn: 34954
2007-03-06 03:41:50 +00:00
Reid Spencer fe5550b2cf Obtain the exit function before execution just in case the module
disappears before we get to calling the exit function.

llvm-svn: 34953
2007-03-06 03:12:55 +00:00
Reid Spencer c764c55745 Simplify code as a result of the change in GenericValue to have a single
integer field of type APInt instead of different sized integer fields.

llvm-svn: 34952
2007-03-06 03:11:31 +00:00
Reid Spencer 40015aad5a Radically simplify execution. This patch gets rid of all the special
handling for integer of various sizes. GenericValue now has just a single
integer field of type APInt. We use its facilities directly in the
execution of all instructions.

llvm-svn: 34951
2007-03-06 03:09:31 +00:00
Reid Spencer c45e10474a Adjust and simplify external function processing now that GenericValue has
a single integer field of type APInt.

llvm-svn: 34950
2007-03-06 03:08:12 +00:00
Reid Spencer 7f68713eb8 APInt's are no longer allocated on the heap because they are direct
members of GenericValue. Consequently the code to clean them up isn't
needed.

llvm-svn: 34948
2007-03-06 03:06:48 +00:00
Reid Spencer 2d89fa84bc Remove the insufficient code in Interpreter::create that computed the
Target DataLayout incorrectly. For now, we'll trust that the module has
got the correct DataLayout. In the future, this needs to be changed to
tell the TargetData to be "current host".

llvm-svn: 34947
2007-03-06 03:05:57 +00:00
Reid Spencer 87aa65f40e Simplify things significantly because GenericValue now has a single integer
field, of type APInt, instead of multiple integer fields. Also, get rid of
the special endianness code in StoreValueToMemory and LoadValueToMemory.
ExecutionEngine is always used to execute on the host platform so this is
now unnecessary.

llvm-svn: 34946
2007-03-06 03:04:04 +00:00
Reid Spencer b5caad1d5c Make GenericeValue into a struct with a union instead of just a union. This
allows an APInt value to be constructed. Remove all the native integer types
from the union. These are replaced with the single IntVal of type APInt.

llvm-svn: 34945
2007-03-06 03:01:54 +00:00
Reid Spencer 3f634774aa Test to ensure that data layout is generated correctly for host platform.
This is for PR1242.

llvm-svn: 34944
2007-03-06 03:00:17 +00:00
Devang Patel a8c81c5261 Use std::deque to manage loop queue inside LPPassManager.
llvm-svn: 34943
2007-03-06 02:30:46 +00:00
Devang Patel 42dd1e92c7 Keep track of inherited analysis. For example, if a loop pass does not
preserve dominator info then it should update parent FPPassManager's
available analysis info to reflect this.

llvm-svn: 34942
2007-03-06 01:55:46 +00:00
Devang Patel d74ede70fb Add preparePassManager() hook. This allows each pass to check whether
current active pass manager is appropriate or not.

A loop pass may consider current LPPassManager in appropraite if loop
pass is not preserving analysis information that is used by other
passes managed by current LPPassManager. In such situation, loop pass
can pop current LPPassManager from the PMStack using this  hook
and use new LPPassManager for itself.

llvm-svn: 34941
2007-03-06 01:06:16 +00:00
Chris Lattner 4f2e4e0f92 Switch PPC return lower to use an autogenerated CC description.
llvm-svn: 34940
2007-03-06 00:59:59 +00:00
Reid Spencer 3939b1a274 Remove an unnecessary if statement and adjust indentation.
llvm-svn: 34939
2007-03-05 23:36:13 +00:00
Bill Wendling b1c86b49ea Add the emms intrinsic for MMX support.
llvm-svn: 34938
2007-03-05 23:09:45 +00:00
Reid Spencer ad0075d6d4 Document the use of getValueType() more accurately, specifically explain
that the instruction opcode is added to the InstructionVal value and the
consequences of that.

llvm-svn: 34937
2007-03-05 23:06:32 +00:00
Devang Patel ec2b9a7850 Current pass manager, not the parent pass manager, assumes the role of
last user when one of the managed pass uses info provided by parent pass
manager.

This was exposed by LPPassManager work.

llvm-svn: 34936
2007-03-05 22:57:49 +00:00
Reid Spencer 509acc186e Add a test case for a particular udiv/select transform.
llvm-svn: 34935
2007-03-05 22:51:08 +00:00
Devang Patel 003a559633 Avoid constructing std::strings unless pass debugging is ON.
llvm-svn: 34933
2007-03-05 20:01:30 +00:00
Devang Patel 7ebf09dbca Account for time consumed by releaseMemory() properly.
llvm-svn: 34932
2007-03-05 18:20:51 +00:00
Lauro Ramos Venancio f10769dda7 Use init_array/fini_array sections for static contructors/destructors when the ABI is AAPCS.
Fix SingleSource/Regression/C/ConstructorDestructorAttributes test on arm-linux-gnueabi.

llvm-svn: 34931
2007-03-05 17:59:58 +00:00
Jeff Cohen 9bf52a72d1 The hack won't work on VS 2005, and it might not be needed anyway.
llvm-svn: 34930
2007-03-05 17:22:33 +00:00
Zhou Sheng 9587a919ee Correct the calculation in APInt::logBase2().
llvm-svn: 34929
2007-03-05 16:42:58 +00:00
Duncan Sands b4086b65e1 Credit self for Ada front-end.
llvm-svn: 34928
2007-03-05 09:21:11 +00:00
Duncan Sands 0af659640e Testcase for handling of static constant declarations in EmitBIND_EXPR.
llvm-svn: 34927
2007-03-05 08:39:58 +00:00
Duncan Sands 49f6938169 Testcase causing the Ada front-end to create bogus constructor fields.
llvm-svn: 34926
2007-03-05 08:34:35 +00:00
Duncan Sands 14b7061a60 New directory for Ada testcases. Test handling of NON_LVALUE_EXPR.
llvm-svn: 34925
2007-03-05 08:20:48 +00:00
Chris Lattner 66e6a8229a This is the first major step of implementing PR1226. We now successfully
scalarrepl things down to elements, but mem2reg can't promote elements that
are memset/memcpy'd.  Until then, the code is disabled "0 &&".

llvm-svn: 34924
2007-03-05 07:52:57 +00:00
Jeff Cohen 7157fe3f4b Ensure 64-bit correctness.
llvm-svn: 34923
2007-03-05 05:45:08 +00:00
Jeff Cohen a531d04b64 Implement memoryLimit on Windows.
llvm-svn: 34922
2007-03-05 05:22:08 +00:00
Jeff Cohen 50bf51e8ac Elminate tabs and improve comments.
llvm-svn: 34921
2007-03-05 00:46:22 +00:00
Chris Lattner fe53cf2459 fix a subtle bug that caused an MSVC warning. Thanks to Jeffc for pointing this out.
llvm-svn: 34920
2007-03-05 00:11:19 +00:00
Chris Lattner 5fdded1d2f Add some simplifications for demanded bits, this allows instcombine to turn:
define i64 @test(i64 %A, i32 %B) {
        %tmp12 = zext i32 %B to i64             ; <i64> [#uses=1]
        %tmp3 = shl i64 %tmp12, 32              ; <i64> [#uses=1]
        %tmp5 = add i64 %tmp3, %A               ; <i64> [#uses=1]
        %tmp6 = and i64 %tmp5, 123              ; <i64> [#uses=1]
        ret i64 %tmp6
}

into:

define i64 @test(i64 %A, i32 %B) {
        %tmp6 = and i64 %A, 123         ; <i64> [#uses=1]
        ret i64 %tmp6
}

This implements Transforms/InstCombine/add2.ll:test1

llvm-svn: 34919
2007-03-05 00:02:29 +00:00
Chris Lattner 3a8b0c7607 new testcase
llvm-svn: 34918
2007-03-05 00:01:38 +00:00
Jeff Cohen b622c11f77 Unbreak VC++ build.
llvm-svn: 34917
2007-03-05 00:00:42 +00:00
Chris Lattner 2fbcc0714c add a getSignBit method, elimiante virtual method from getBitMask()
llvm-svn: 34916
2007-03-04 23:33:19 +00:00
Chris Lattner e824f085c8 fix 80 col violations, mark arrays static
llvm-svn: 34915
2007-03-04 23:33:03 +00:00
Chris Lattner ab2f913b68 simplify some code
llvm-svn: 34914
2007-03-04 23:16:36 +00:00
Chris Lattner 47206667c0 fold away addc nodes when we know there cannot be a carry-out.
llvm-svn: 34913
2007-03-04 20:40:38 +00:00