Commit Graph

73207 Commits

Author SHA1 Message Date
Chad Rosier f3e11190f3 Test case for r133858 (tail call optimize in the presence of byval).
llvm-svn: 133863
2011-06-25 02:44:56 +00:00
Oscar Fuentes 8ca6622e9a Update CMake library dependencies.
llvm-svn: 133859
2011-06-25 02:10:19 +00:00
Chad Rosier bde13d3f76 Enable tail call optimization in the presence of a byval (x86-32 and x86-64).
<rdar://problem/9483883>

llvm-svn: 133858
2011-06-25 02:04:56 +00:00
Jim Grosbach 8fbb89ffa4 Move ARM-specific test to ARM directory.
Hopefully make the x86-target-only Windows bots happy.

llvm-svn: 133856
2011-06-25 01:53:17 +00:00
Douglas Gregor 03bf47c0f0 Unbreak CMake build
llvm-svn: 133853
2011-06-25 00:51:50 +00:00
Evan Cheng 5f83678222 Remove dead typedefs.
llvm-svn: 133851
2011-06-25 00:27:17 +00:00
Evan Cheng b2681bef4f Add include guard.
llvm-svn: 133847
2011-06-24 23:59:54 +00:00
Evan Cheng 3b960aca17 Rename TargetDesc to MCTargetDesc
llvm-svn: 133846
2011-06-24 23:53:19 +00:00
Evan Cheng 4ffc43bce0 Rename TargetRegisterDesc to MCRegisterDesc
llvm-svn: 133845
2011-06-24 23:44:48 +00:00
Jim Grosbach 28fcafb502 Refactor MachO relocation generaration into the Target directories.
Move the target-specific RecordRelocation logic out of the generic MC
MachObjectWriter and into the target-specific object writers. This allows
nuking quite a bit of target knowledge from the supposedly target-independent
bits in lib/MC.

llvm-svn: 133844
2011-06-24 23:44:37 +00:00
Owen Anderson 99adfec0b1 The scheduler needs to be aware on the existence of untyped nodes when it performs type propagation for EXTRACT_SUBREG.
llvm-svn: 133838
2011-06-24 23:02:22 +00:00
Bob Wilson d2a4a871a9 Revert "Shorten some ARM builtin names by removing unnecessary "neon" prefix."
Sorry, this was a bad idea.  Within clang these builtins are in a separate
"ARM" namespace, but the actual builtin names should clearly distinguish that
they are target specific.

llvm-svn: 133832
2011-06-24 22:13:17 +00:00
Rafael Espindola 38c3c7f386 Fix cmake build.
llvm-svn: 133830
2011-06-24 22:01:28 +00:00
Devang Patel 503c3998f3 Fix struct member's scope. Patch by Xi Wang.
llvm-svn: 133828
2011-06-24 22:00:39 +00:00
Bob Wilson 4f728fd0de Shorten some ARM builtin names by removing unnecessary "neon" prefix.
llvm-svn: 133825
2011-06-24 21:32:40 +00:00
Chad Rosier e553e75b15 Hoist simple check above more complex checking to avoid unnecessary
overheads.  No functional change intended.

llvm-svn: 133824
2011-06-24 21:15:36 +00:00
Jim Grosbach 045e26166a Testcase for r133818
llvm-svn: 133823
2011-06-24 20:59:01 +00:00
Devang Patel 6be2a11257 Revert unintentional check-in.
llvm-svn: 133822
2011-06-24 20:48:14 +00:00
Devang Patel f071d72c44 Handle debug info for i128 constants.
llvm-svn: 133821
2011-06-24 20:46:11 +00:00
Evan Cheng e862d59eee - Add MCRegisterInfo registration machinery. Also added x86 registration routines.
- Rename TargetRegisterDesc to MCRegisterDesc.

llvm-svn: 133820
2011-06-24 20:42:09 +00:00
Jim Grosbach 6629b574b3 ARM movw/movt fixups need to mask the high bits.
The fixup value comes in as the whole 32-bit value, so for the lo16 fixup,
the upper bits need to be masked off. Previously we assumed the masking had
already been done and asserted.

rdar://9635991

llvm-svn: 133818
2011-06-24 20:06:59 +00:00
Jim Grosbach 018970216c tidy up whitespace.
llvm-svn: 133815
2011-06-24 19:43:27 +00:00
Dan Bailey dd01c4ac7a PTX: Add support for i8 type and introduce associated .b8 registers
The i8 type is required for boolean values, but can only use ld, st and mov instructions. The i1 type continues to be used for predicates.

llvm-svn: 133814
2011-06-24 19:27:10 +00:00
Chad Rosier fa8d89327f The Neon VCVT (between floating-point and fixed-point, Advanced SIMD)
instructions can be used to match combinations of multiply/divide and VCVT 
(between floating-point and integer, Advanced SIMD).  Basically the VCVT 
immediate operand that specifies the number of fraction bits corresponds to a 
floating-point multiply or divide by the corresponding power of 2.

For example, VCVT (floating-point to fixed-point, Advanced SIMD) can replace a 
combination of VMUL and VCVT (floating-point to integer) as follows:

Example (assume d17 = <float 8.000000e+00, float 8.000000e+00>):
  vmul.f32        d16, d17, d16
  vcvt.s32.f32    d16, d16
becomes:
  vcvt.s32.f32    d16, d16, #3

Similarly, VCVT (fixed-point to floating-point, Advanced SIMD) can replace a 
combinations of VCVT (integer to floating-point) and VDIV as follows:

Example (assume d17 = <float 8.000000e+00, float 8.000000e+00>):
  vcvt.f32.s32    d16, d16
  vdiv.f32        d16, d17, d16
becomes:
  vcvt.f32.s32    d16, d16, #3

llvm-svn: 133813
2011-06-24 19:23:04 +00:00
Justin Holewinski 1be944a466 PTX: Add preliminary support for outputting debug information in the form of
.file and .loc directives.

Ideally, we would utilize the existing support in AsmPrinter for this, but
I cannot find a way to get .file and .loc directives to print without the
rest of the associated DWARF sections, which ptxas cannot handle.

llvm-svn: 133812
2011-06-24 19:19:18 +00:00
Akira Hatanaka 35792089e7 Change the chain input of nodes that load the address of a function. This change
enables SelectionDAG::getLoad at MipsISelLowering.cpp:1914 to return a
pre-existing node instead of redundantly create a new node every time it is
called.

llvm-svn: 133811
2011-06-24 19:01:25 +00:00
Jim Grosbach 3c9ede62f6 Fixup info for Thumb2 unconditional branch.
rdar://9667872

llvm-svn: 133808
2011-06-24 18:48:32 +00:00
Akira Hatanaka ca88b4abec Prevent generation of redundant addiu instructions that compute address of
static variables or functions. 

llvm-svn: 133803
2011-06-24 17:55:19 +00:00
Justin Holewinski 7d65756aba PTX: Re-work target sm/compute selection and add some basic GPU
targets: g80, gt200, gf100(fermi)

llvm-svn: 133799
2011-06-24 16:27:49 +00:00
Rafael Espindola 5135ae2383 Simplify
llvm-svn: 133798
2011-06-24 15:50:56 +00:00
Rafael Espindola cb0213bda6 Now that bb with phis are not considered simple, duplicate them even if
we cannot duplicate to every predecessor.

llvm-svn: 133797
2011-06-24 15:47:41 +00:00
Rafael Espindola ad0cdd5606 Simplify now that blocks with phis are not considered simple.
llvm-svn: 133793
2011-06-24 14:04:13 +00:00
Rafael Espindola cff9c5e9a0 Fix CellSPU CMakeList.txt.
llvm-svn: 133792
2011-06-24 13:58:45 +00:00
Benjamin Kramer bb576b3156 Make the generated InitXXXMCRegisterInfo function "static inline", so it doesn't get emitted into multiple object files.
This caused linker errors when linking both libLLVMX86Desc and libLLVMX86CodeGen
into a single binary (for example when building a monolithic libLLVM shared library).

llvm-svn: 133791
2011-06-24 11:03:31 +00:00
Evan Cheng 8e731166d0 Fix CellSPU CMakeLists.txt
llvm-svn: 133787
2011-06-24 05:04:48 +00:00
Evan Cheng 247533179a Starting to refactor Target to separate out code that's needed to fully describe
target machine from those that are only needed by codegen. The goal is to
sink the essential target description into MC layer so we can start building
MC based tools without needing to link in the entire codegen.

First step is to refactor TargetRegisterInfo. This patch added a base class
MCRegisterInfo which TargetRegisterInfo is derived from. Changed TableGen to
separate register description from the rest of the stuff.

llvm-svn: 133782
2011-06-24 01:44:41 +00:00
Jakub Staszak 1aae619933 Calculate backedge probability correctly.
llvm-svn: 133776
2011-06-23 23:52:11 +00:00
Jim Grosbach 7633256b9d Tidy up.
llvm-svn: 133770
2011-06-23 22:29:00 +00:00
Jakub Staszak 668c6fae76 Missing files for the BlockFrequency analysis added.
llvm-svn: 133767
2011-06-23 21:56:59 +00:00
Jakub Staszak be52acc98a Introduce BlockFrequency analysis for BasicBlocks.
llvm-svn: 133766
2011-06-23 21:45:20 +00:00
Eli Friedman 5c958bb528 Add support for movntil/movntiq mnemonics. Reported on llvmdev.
llvm-svn: 133759
2011-06-23 21:07:47 +00:00
Eli Friedman 2c980fafff PR10180: Fix a instcombine crash with FP vectors.
llvm-svn: 133756
2011-06-23 20:40:23 +00:00
Eli Friedman f7d2340420 Fix build for (some versions of?) MinGW. Patch by Ruben Van Boxem.
llvm-svn: 133741
2011-06-23 18:24:27 +00:00
Evan Cheng 8b2a2a1158 Rename TargetOptions::StackAlignment to StackAlignmentOverride.
llvm-svn: 133739
2011-06-23 18:15:47 +00:00
Evan Cheng 1b049f5851 Remove TargetOptions.h dependency from ARMSubtarget.
llvm-svn: 133738
2011-06-23 18:15:17 +00:00
Justin Holewinski 6cdd72a9ca PTX: Always use registers for return values, but use .param space for device
parameters if SM >= 2.0

- Update test cases to be more robust against register allocation changes
- Bump up the number of registers to 128 per type
- Include Python script to re-generate register file with any number of
  registers

llvm-svn: 133736
2011-06-23 18:10:13 +00:00
Justin Holewinski a4aecf3dc4 PTX: Fixup test cases for device param changes
llvm-svn: 133735
2011-06-23 18:10:08 +00:00
Justin Holewinski 90b336ba0c PTX: Whitespace fixes and remove commented out code
llvm-svn: 133734
2011-06-23 18:10:07 +00:00
Justin Holewinski 9b459d9d7b PTX: Prevent DCE from eliminating st.param calls, and unify the handling of
st.param and ld.param

FIXME: Test cases still need to be updated
llvm-svn: 133733
2011-06-23 18:10:05 +00:00
Justin Holewinski 9472541ba1 PTX: Use .param space for parameters in device functions for SM >= 2.0
FIXME: DCE is eliminating the final st.param.x calls, figure out why
llvm-svn: 133732
2011-06-23 18:10:03 +00:00