1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
Commit Graph

28716 Commits

Author SHA1 Message Date
Bruno Cardoso Lopes
9b68e8653f Support for ELF Visibility
Emission for globals, using the correct data sections
Function alignment can be computed for each target using TargetELFWriterInfo
Some small fixes

llvm-svn: 73201
2009-06-11 19:16:03 +00:00
Chris Lattner
e0360f8ae8 Fix 4366: store to null in non-default addr space should not be
turned into unreachable.

llvm-svn: 73195
2009-06-11 17:54:56 +00:00
Sanjiv Gupta
4d678059ba Generate libcalls for floating point arithmetic and casting operations.
llvm-svn: 73194
2009-06-11 16:50:48 +00:00
Duncan Sands
9b5e3effef Cosmetic changes to parameter attribute verification.
llvm-svn: 73188
2009-06-11 08:11:03 +00:00
Duncan Sands
c12241a948 Avoid leaking memory in an error path. Noticed
by cppcheck.

llvm-svn: 73187
2009-06-11 08:09:49 +00:00
Sanjiv Gupta
1f8f8ce400 More formatting.
llvm-svn: 73185
2009-06-11 06:55:48 +00:00
Sanjiv Gupta
04cb690c99 Fixed source comments. No functionality change.
llvm-svn: 73184
2009-06-11 06:49:55 +00:00
Oscar Fuentes
c2d42ced17 CMake: Updated list of files on lib/CodeGen/CMakeLists.txt.
llvm-svn: 73174
2009-06-10 22:53:59 +00:00
Jay Foad
5affd7b2c9 Implement and use new method Function::hasAddressTaken().
llvm-svn: 73164
2009-06-10 08:41:11 +00:00
Sanjiv Gupta
02c9163ae2 Remove warnings: no newline at end of file.
llvm-svn: 73156
2009-06-10 03:42:13 +00:00
Anton Korobeynikov
1447d902e3 Silence a warning
llvm-svn: 73152
2009-06-09 23:00:39 +00:00
Jay Foad
209162fd09 Remove an unused function SafeToDestroyConstant(). Rename an almost
identical function ConstantIsDead() to SafeToDestroyConstant(), to
emphasise the connection with Constant::destroyConstant().

llvm-svn: 73149
2009-06-09 21:37:11 +00:00
Bill Wendling
23d6f0b5c7 Simplified logic of this if-then statement to reduce nesting. No functionality
change.

llvm-svn: 73143
2009-06-09 20:08:51 +00:00
Owen Anderson
996a7f7f37 Add the beginnings of an implementatation of lazy liveness analysis, based on "Fast Liveness Checking for SSA-form Programs" by Boissinot, et al.
This is still very early, hasn't been tested, and is not yet well documented.  More to come soon.

llvm-svn: 73141
2009-06-09 19:30:45 +00:00
Dan Gohman
389d27ecdd Use expandCodeFor instead of expand when the result will be
immediately casted. At present, this is just a minor code
simplification. In the future, the expansion code may be able
to make better choices if it knows what the desired result
type will be.

llvm-svn: 73137
2009-06-09 17:18:38 +00:00
Sanjiv Gupta
2121a84223 PIC16 emits auto variables as globals. When optimizer removes a function entierly by estimating its side effects on globals, those globals(autos) without a function were not being printed by the Asm printer.
llvm-svn: 73135
2009-06-09 15:31:19 +00:00
Anton Korobeynikov
6dbf7b689c Typo
llvm-svn: 73098
2009-06-08 22:59:50 +00:00
Anton Korobeynikov
0677cee20d Revert hunk commited by accident
llvm-svn: 73097
2009-06-08 22:57:18 +00:00
Anton Korobeynikov
d08df21f36 The attached patches implement most of the ARM AAPCS-VFP hard float
ABI. The missing piece is support for putting "homogeneous aggregates"
into registers.

Patch by Sandeep Patel!

llvm-svn: 73095
2009-06-08 22:53:56 +00:00
Anton Korobeynikov
52b2898854 Separate V6 from V6T2 since the latter has some extra nice instructions
llvm-svn: 73085
2009-06-08 21:20:36 +00:00
Anton Korobeynikov
7e9e1b3e1f Add helper for checking of Thumb1 mode
llvm-svn: 73080
2009-06-08 20:31:02 +00:00
Bill Wendling
b0c6fe320d Revert r72898. It does not solve the problem I want it to solve.
llvm-svn: 73075
2009-06-08 18:18:28 +00:00
Bruno Cardoso Lopes
472eb7c299 Delete comment and fix typo
llvm-svn: 73040
2009-06-07 21:49:11 +00:00
Bruno Cardoso Lopes
f7d71605a6 Fix wrong elf class and byte order initializations.
llvm-svn: 73039
2009-06-07 21:33:20 +00:00
Bruno Cardoso Lopes
cfa07266cf Simple ELF32/64 binary files can now be emitted for x86 and x86_64 without
relocation sections.

llvm-svn: 73038
2009-06-07 21:22:38 +00:00
Eli Friedman
2964aa5a38 Tweak the expansion code for BIT_CONVERT to generate better code
converting from an MMX vector to an i64.

llvm-svn: 73024
2009-06-07 09:41:57 +00:00
Eli Friedman
1609a6524f Get rid of some unnecessary code.
llvm-svn: 73017
2009-06-07 07:28:45 +00:00
Nick Lewycky
71dc3c5d85 Create FunctionType::isValidArgumentType to go along with isValidReturnType.
Also create isValidElementType for ArrayType, PointerType, StructType and
VectorType.

Make LLParser use them. This closes up some holes like an assertion failure on:

  %x = type {label}

but largely doesn't change any semantics. The only thing we accept now which
we didn't before is vectors of opaque type such as "<4 x opaque>". The opaque
can be resolved to an int or float when linking.

llvm-svn: 73016
2009-06-07 07:26:46 +00:00
Eli Friedman
d4b463b0dc Slightly generalize the code that handles shuffles of consecutive loads
on x86 to handle more cases.  Fix a bug in said code that would cause it 
to read past the end of an object.  Rewrite the code in 
SelectionDAGLegalize::ExpandBUILD_VECTOR to be a bit more general. 
Remove PerformBuildVectorCombine, which is no longer necessary with 
these changes.  In addition to simplifying the code, with this change, 
we can now catch a few more cases of consecutive loads.

llvm-svn: 73012
2009-06-07 06:52:44 +00:00
Nick Lewycky
a96000f2bf Remove cyclic MDNode detection. Any attempt to create a cyclic MDNode will
crash LLVM first.

llvm-svn: 73011
2009-06-07 04:03:01 +00:00
Nick Lewycky
3a8ea63343 Refuse metadata* type for function arguments.
llvm-svn: 73010
2009-06-07 01:45:11 +00:00
Eli Friedman
2b6cb1684f PR3628: Add patterns to match SHL/SRL/SRA to the corresponding Altivec
instructions.

llvm-svn: 73009
2009-06-07 01:07:55 +00:00
Nick Lewycky
1a54547335 Don't crash on multiple return value with no obvious inserted value.
Fixes PR4314.

llvm-svn: 73007
2009-06-06 23:13:08 +00:00
Eli Friedman
770f633389 PR4340: Run SimplifyDemandedVectorElts on insertelement instructions;
sometimes it can find simplifications that won't be found otherwise.

llvm-svn: 73006
2009-06-06 20:08:03 +00:00
Jay Foad
a442a46de9 Use cast<> instead of dyn_cast<> for things that are known to be
Instructions.

llvm-svn: 73002
2009-06-06 17:49:35 +00:00
Dan Gohman
5470ba421d Rename UnknownValue to CouldNotCompute, since it holds an instance of
SCEVCouldNotCompute, and not SCEVUnknown.

llvm-svn: 72999
2009-06-06 14:37:11 +00:00
Eli Friedman
2dadbd05f9 Fix the expansion for CONCAT_VECTORS so that it doesn't create illegal
types.

llvm-svn: 72993
2009-06-06 07:08:26 +00:00
Eli Friedman
85675e8547 Factor out a couple of helpers.
llvm-svn: 72992
2009-06-06 07:04:42 +00:00
Eli Friedman
4395222136 Avoid crashing on a variable-index insertelement with element type i16.
llvm-svn: 72991
2009-06-06 06:32:50 +00:00
Eli Friedman
e546f94ef5 Get rid of some bogus patterns for X86vzmovl. Don't create VZEXT_MOVL
nodes for vectors with an i16 element type.  Add an optimization for 
building a vector which is all zeros/undef except for the bottom 
element, where the bottom element is an i8 or i16.

llvm-svn: 72988
2009-06-06 06:05:10 +00:00
Eli Friedman
539325c8e7 Fix an obvious typo.
llvm-svn: 72987
2009-06-06 05:55:37 +00:00
Bruno Cardoso Lopes
bb6a353eb2 x86_64 now uses the correct ELF e_machine type
llvm-svn: 72986
2009-06-06 04:29:16 +00:00
Eli Friedman
1227d199be Get rid of a bogus pattern that interferes with optimization.
llvm-svn: 72985
2009-06-06 04:17:04 +00:00
Eli Friedman
05eef883e8 PR2598: make sure to expand illegal forms of integer/floating-point
conversions for x86, like <2 x i32> -> <2 x float> and <4 x i16> -> 
<4 x float>.

llvm-svn: 72983
2009-06-06 03:57:58 +00:00
Bruno Cardoso Lopes
b3b24681ca Remove elf specific info from ELFWriter.h to Elf.h. Code cleanup and more comments added
llvm-svn: 72982
2009-06-06 03:56:29 +00:00
Eli Friedman
c7d37a1c3a Make SINT_TO_FP/UINT_TO_FP vector legalization queries query on the
integer type to be consistent with normal operation legalization.  No visible
change because nothing is actually using this at the moment.

llvm-svn: 72980
2009-06-06 03:27:50 +00:00
Devang Patel
a6b3b19170 Simplify.
llvm-svn: 72970
2009-06-05 23:08:56 +00:00
Dan Gohman
e0d593cbf6 Add explicit keywords.
llvm-svn: 72969
2009-06-05 23:05:51 +00:00
Devang Patel
17bb9f4649 Simplify.
llvm-svn: 72965
2009-06-05 22:39:21 +00:00
Devang Patel
8d170194e8 Add new function attribute - noimplicitfloat
Update code generator to use this attribute and remove NoImplicitFloat target option.
Update llc to set this attribute when -no-implicit-float command line option is used.

llvm-svn: 72959
2009-06-05 21:57:13 +00:00