- Oct 16, 2012
-
-
Stepan Dyatkovskiy authored
Stack is formed improperly for long structures passed as byval arguments for EABI mode. If we took AAPCS reference, we can found the next statements: A: "If the argument requires double-word alignment (8-byte), the NCRN (Next Core Register Number) is rounded up to the next even register number." (5.5 Parameter Passing, Stage C, C.3). B: "The alignment of an aggregate shall be the alignment of its most-aligned component." (4.3 Composite Types, 4.3.1 Aggregates). So if we have structure with doubles (9 double fields) and 3 Core unused registers (r1, r2, r3): caller should use r2 and r3 registers only. Currently r1,r2,r3 set is used, but it is invalid. Callee VA routine should also use r2 and r3 regs only. All is ok here. This behaviour is guessed by rounding up SP address with ADD+BFC operations. Fix: Main fix is in ARMTargetLowering::HandleByVal. If we detected AAPCS mode and 8 byte alignment, we waste odd registers then. P.S.: I also improved LDRB_POST_IMM regression test. Since ldrb instruction will not generated by current regression test after this patch. llvm-svn: 166018
-
NAKAMURA Takumi authored
Original message: The attached is the fix to radar://11663049. The optimization can be outlined by following rules: (select (x != c), e, c) -> select (x != c), e, x), (select (x == c), c, e) -> select (x == c), x, e) where the <c> is an integer constant. The reason for this change is that : on x86, conditional-move-from-constant needs two instructions; however, conditional-move-from-register need only one instruction. While the LowerSELECT() sounds to be the most convenient place for this optimization, it turns out to be a bad place. The reason is that by replacing the constant <c> with a symbolic value, it obscure some instruction-combining opportunities which would otherwise be very easy to spot. For that reason, I have to postpone the change to last instruction-combining phase. The change passes the test of "make check-all -C <build-root/test" and "make -C project/test-suite/SingleSource". Original message since r165661: My previous change has a bug: I negated the condition code of a CMOV, and go ahead creating a new CMOV using the *ORIGINAL* condition code. llvm-svn: 166017
-
Bill Wendling authored
llvm-svn: 166016
-
Owen Anderson authored
Fix a bug in the set(I,E)/reset(I,E) methods that I recently added. The boundary condition for checking if I and E were in the same word were incorrect, and, beyond that, the mask computation was not using a wide enough constant. llvm-svn: 166015
-
Craig Topper authored
llvm-svn: 166014
-
Bill Wendling authored
llvm-svn: 166013
-
Bill Wendling authored
llvm-svn: 166012
-
Bill Wendling authored
llvm-svn: 166011
-
Bill Wendling authored
Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change. llvm-svn: 166009
-
Bill Wendling authored
llvm-svn: 166008
-
Bill Wendling authored
llvm-svn: 166007
-
Craig Topper authored
llvm-svn: 166004
-
Rafael Espindola authored
llvm-svn: 166003
-
Andrew Trick authored
This is a medium term workaround until we have a more robust solution in the form of a register liveness utility for postRA passes. llvm-svn: 166001
-
Jakob Stoklund Olesen authored
llvm-svn: 165999
-
Nadav Rotem authored
llvm-svn: 165997
-
Jakob Stoklund Olesen authored
Clients can use the equivalent functions in MRI. llvm-svn: 165990
-
Michael Liao authored
- Besides used in SjLj exception handling, __builtin_setjmp/__longjmp is also used as a light-weight replacement of setjmp/longjmp which are used to implementation continuation, user-level threading, and etc. The support added in this patch ONLY addresses this usage and is NOT intended to support SjLj exception handling as zero-cost DWARF exception handling is used by default in X86. llvm-svn: 165989
-
Jakob Stoklund Olesen authored
All callers can simply use the corresponding MRI functions. llvm-svn: 165985
-
Owen Anderson authored
Add range-based set()/reset() to BitVector. These allow fast setting/resetting of ranges of bits, particularly useful when dealing with very large BitVector's. llvm-svn: 165984
-
- Oct 15, 2012
-
-
Jakob Stoklund Olesen authored
Using the cached bit vector in MRI avoids comstantly allocating and recomputing the reserved register bit vector. llvm-svn: 165983
-
Jakob Stoklund Olesen authored
Also provide an MRI::getReservedRegs() function to access the frozen register set, and isReserved() and isAllocatable() methods to test individual registers. The various implementations of TRI::getReservedRegs() are quite complicated, and many passes need to look at the reserved register set. This patch makes it possible for these passes to use the cached copy in MRI, avoiding a lot of malloc traffic and repeated calculations. llvm-svn: 165982
-
Jim Grosbach authored
rdar://12502028 llvm-svn: 165981
-
David Blaikie authored
This fixes a CMake build break introduced by r165739. Thanks Jan Voung for the quick suggestion/fix. llvm-svn: 165978
-
Bill Wendling authored
Move the Attributes::Builder outside of the Attributes class and into its own class named AttrBuilder. No functionality change. llvm-svn: 165960
-
Andrew Trick authored
llvm-svn: 165959
-
Bill Wendling authored
llvm-svn: 165958
-
Rafael Espindola authored
llvm-svn: 165956
-
Chad Rosier authored
llvm-svn: 165955
-
Rafael Espindola authored
llvm-svn: 165954
-
Andrew Trick authored
llvm-svn: 165952
-
Rafael Espindola authored
follow in one sec. llvm-svn: 165951
-
Andrew Trick authored
llvm-svn: 165950
-
Chad Rosier authored
llvm-svn: 165947
-
Chad Rosier authored
inline assembly. For the time being, these will be called directly by clang. However, in the near future I expect these to be sunk back into the MC layer and more basic APIs (e.g., getClobbers(), getConstraints(), etc.) will be called by clang. llvm-svn: 165946
-
Chad Rosier authored
llvm-svn: 165945
-
Jan Wen Voung authored
llvm-svn: 165944
-
Micah Villmow authored
Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis. llvm-svn: 165941
-
Adhemerval Zanella authored
This patch replaces the EmitRawText by a EmitTCEntry class (specialized for each Streamer) in PowerPC64 TOC entry creation. llvm-svn: 165940
-
Kostya Serebryany authored
llvm-svn: 165938
-