1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 14:33:02 +02:00
Commit Graph

19335 Commits

Author SHA1 Message Date
Owen Anderson
da85a8134e Remove an incorrect check.
llvm-svn: 37948
2007-07-06 16:52:47 +00:00
Duncan Sands
f926a3080c The exception handling intrinsics return values,
so must be lowered to a value, not nothing at all.
Subtle point: I made eh_selector return 0 and
eh_typeid_for return 1.  This means that only
cleanups (destructors) will be run as the exception
unwinds [if eh_typeid_for returned 0 then it would
be as if the first catch always matched, and the
corresponding handler would be run], which is
probably want you want in the CBE.

llvm-svn: 37947
2007-07-06 14:46:23 +00:00
Gabor Greif
f5e225a756 eliminate residual cruft related to recognizing bytecode
files.
bitcode files are the only LLVM format left.

llvm-svn: 37945
2007-07-06 13:38:17 +00:00
Duncan Sands
404336eb55 Indexes into the list of filter ids cannot be output
directly: they need to be turned into byte offsets
(often the same, but may not be if there are many
type infos).

llvm-svn: 37942
2007-07-06 12:46:24 +00:00
Rafael Espindola
7b3de98989 Add the byval attribute
llvm-svn: 37940
2007-07-06 10:57:03 +00:00
Gabor Greif
f9cf3d3440 Solaris 2.x does not have RLIMIT_RSS, check for this symbol (analog NetBSD below), should subsume Cygwin
llvm-svn: 37939
2007-07-06 10:31:27 +00:00
Duncan Sands
7e50c11edd Remove propagateEHRegister in favour of a more limited
fix, that is adequate while PR1508 remains unresolved.

llvm-svn: 37938
2007-07-06 09:18:59 +00:00
Duncan Sands
e7650d2b1e Remove ExtractGlobalVariable - use StripPointerCasts
instead.

llvm-svn: 37937
2007-07-06 09:10:03 +00:00
Zhou Sheng
2a79b1ae13 Correct a typo.
llvm-svn: 37936
2007-07-06 06:01:16 +00:00
Evan Cheng
bae19254f0 Workaround of getCopyToRegs and getCopyFromRegs bugs for big-endian machines.
llvm-svn: 37935
2007-07-06 01:47:35 +00:00
Evan Cheng
22957164aa Change CalculateHeights and CalculateDepths to be non-recursive.
llvm-svn: 37934
2007-07-06 01:37:28 +00:00
Evan Cheng
721b83bbe6 Print the s bit if the instruction is toggled to its CPSR setting form.
llvm-svn: 37932
2007-07-06 01:01:34 +00:00
Evan Cheng
c2c0b495ed PredicateDefOperand -> OptionalDefOperand.
llvm-svn: 37931
2007-07-06 01:00:49 +00:00
Evan Cheng
0adaea7381 Add OptionalDefOperand to stand for optionally defined result.
llvm-svn: 37930
2007-07-06 01:00:16 +00:00
Owen Anderson
7cf3a2aa1f Fix a bunch of issues found in a testcase from 400.perlbench.
llvm-svn: 37929
2007-07-05 23:11:26 +00:00
Evan Cheng
96254545ae Initial ARM JIT support by Raul Fernandes Herbster.
llvm-svn: 37926
2007-07-05 21:15:40 +00:00
Anton Korobeynikov
e8215d1780 Proper flag __alloca call
llvm-svn: 37923
2007-07-05 20:36:08 +00:00
Dan Gohman
cd6f6a0a58 Make the debug string for ISD::MERGE_VALUES consistent with the others.
llvm-svn: 37922
2007-07-05 20:15:43 +00:00
Dan Gohman
90c6b87b31 Add a parameter to getCopyToParts and getCopyFromParts to specify whether
endian swapping should be done, and update the code to use it. This fixes
some register ordering issues on big-endian systems, such as PowerPC,
introduced by the recent illegal by-val arguments changes.

llvm-svn: 37921
2007-07-05 20:12:34 +00:00
Chris Lattner
e1541b7c18 This enum is dead
llvm-svn: 37920
2007-07-05 17:28:01 +00:00
Chris Lattner
1d5bf72d84 update the .cvs files
llvm-svn: 37918
2007-07-05 17:26:49 +00:00
Evan Cheng
25450e48ca Doh
llvm-svn: 37917
2007-07-05 17:21:33 +00:00
Chris Lattner
388423f08c remove a dead case
llvm-svn: 37916
2007-07-05 17:18:32 +00:00
Evan Cheng
04d3ebc699 Unbreak the build.
llvm-svn: 37915
2007-07-05 17:13:56 +00:00
Evan Cheng
a59422068f Unbreak the build.
llvm-svn: 37914
2007-07-05 17:13:19 +00:00
Gabor Greif
5f705671e4 Here is the bulk of the sanitizing.
Almost all occurrences of "bytecode" in the sources have been eliminated.

llvm-svn: 37913
2007-07-05 17:07:56 +00:00
Chris Lattner
ff6104f9d5 the arm backend is not building, temporarily disable it.
llvm-svn: 37911
2007-07-05 16:11:52 +00:00
Duncan Sands
eca2fa295b Make sure only one copy of a filter is placed in the
exception handling table if we encounter it multiple
times.  Filters could be folded harder than this, but
that would mean a lot more work for not much gain.

llvm-svn: 37908
2007-07-05 15:15:01 +00:00
Evan Cheng
be54fdf431 Reflects the chanegs made to PredicateOperand.
llvm-svn: 37898
2007-07-05 07:18:20 +00:00
Evan Cheng
3d2cfd8bb1 Added ARM::CPSR to represent ARM CPSR status register.
llvm-svn: 37897
2007-07-05 07:17:13 +00:00
Evan Cheng
2403cc41ea Unfortunately we now require C++ code to isel Bcc, conditional moves, etc.
llvm-svn: 37896
2007-07-05 07:15:27 +00:00
Evan Cheng
ef8a1bcbc3 Each ARM use predicate operand is now made up of two components. The new component is the CPSR register.
llvm-svn: 37895
2007-07-05 07:13:32 +00:00
Evan Cheng
4af116139b Added ARM::CPSR to represent ARM CPSR status register.
llvm-svn: 37894
2007-07-05 07:11:03 +00:00
Evan Cheng
9b7432c311 PPC conditional branch predicate does not change after isel.
llvm-svn: 37893
2007-07-05 07:09:50 +00:00
Evan Cheng
8b0cbaff08 - Added zero_reg def to stand for register 0.
- Added two variants of PredicateOperand: ImmutablePredicateOperand, whose predicate does not change after isel; PredicateDefOperand, which represent a predicate defintion operand.

llvm-svn: 37892
2007-07-05 07:09:09 +00:00
Evan Cheng
50367dfc3e Do not check isPredicated() on non-predicable instructions.
llvm-svn: 37891
2007-07-05 07:06:46 +00:00
Evan Cheng
0c037f4ee0 Better assertion messages.
llvm-svn: 37890
2007-07-05 07:05:38 +00:00
Nick Lewycky
c744dbdd30 Break "variable canonicalization" out of InequalityGraph and into its own class
"ValueNumbering".

llvm-svn: 37881
2007-07-05 03:15:00 +00:00
Owen Anderson
2024c08f65 Fix another bug, this time in PREing select instructions.
llvm-svn: 37878
2007-07-04 22:33:23 +00:00
Dale Johannesen
9072b65b0b Refactor X87 instructions. As a side effect, all
their names are changed.

llvm-svn: 37876
2007-07-04 21:07:47 +00:00
Duncan Sands
4441eff1ac Extend eh.selector to support both catches and filters.
Drop the eh.filter intrinsic.

llvm-svn: 37875
2007-07-04 20:52:51 +00:00
Owen Anderson
ac8fe6b8ca Fix a typo that was killing GVNPRE of select instructions.
llvm-svn: 37871
2007-07-04 18:26:18 +00:00
Owen Anderson
06dd016177 Fix an error in phi translation of GEPs that was causing failures.
llvm-svn: 37868
2007-07-04 04:51:16 +00:00
Bill Wendling
2e66551f22 Support generation of GR64 to MMX code in the JIT.
llvm-svn: 37866
2007-07-04 01:29:22 +00:00
Bill Wendling
3600c7a835 Allow a GR64 to be moved into an MMX register via the "movd" instruction.
Still need to have JIT generate this code.

llvm-svn: 37863
2007-07-04 00:19:54 +00:00
Owen Anderson
4a5c005585 Add support for performing GVNPRE on GEP instructions.
llvm-svn: 37862
2007-07-03 23:51:19 +00:00
Owen Anderson
6599e49230 Add functionality to value number GEP instructions. This also provides the infrastructure that will
be used for function calls.  NOTE: This does not yet do any transformation of GEPs or function calls.

llvm-svn: 37860
2007-07-03 22:50:56 +00:00
Owen Anderson
778ad67a26 Make the unary operator case a bit faster, since casts are the only kind of unary operation.
llvm-svn: 37857
2007-07-03 19:01:42 +00:00
Owen Anderson
ba084e17fd Add support for performing GVNPRE on cast instructions, and add a testcase for this.
llvm-svn: 37856
2007-07-03 18:37:08 +00:00
Dale Johannesen
0db4ba9f8a Some spacing fixes. Cosmetic.
llvm-svn: 37853
2007-07-03 17:07:33 +00:00
Dan Gohman
d2d18267e6 Fix several over-aggressive folds for undef nodes in dagcombine, to
follow the rules for undef used in instcombine.

llvm-svn: 37851
2007-07-03 14:03:57 +00:00
Dale Johannesen
7af19491d3 Fix for PR 1505 (and 1489). Rewrite X87 register
model to include f32 variants.  Some factoring
improvments forthcoming.

llvm-svn: 37847
2007-07-03 00:53:03 +00:00
Dan Gohman
eb46e6e629 Vector results may be returned in XMM0 and XMM1, not just XMM0. With
the recent lowering changes, this allows types like <4 x double> to
be returned, using two vector registers.

llvm-svn: 37844
2007-07-02 16:21:53 +00:00
Dan Gohman
68f0cbccfb Replace ExpandScalarFormalArgs and ExpandScalarCallArgs with the newly
refactored getCopyFromParts and getCopyToParts, which are more general.
This effectively adds support for lowering illegal by-val vector call
arguments.

llvm-svn: 37843
2007-07-02 16:18:06 +00:00
Dan Gohman
5fe8266d04 Teach GetNegatedExpression to negate 0-B to B in UnsafeFPMath mode, and
visitFSUB to fold 0-B to -B in UnsafeFPMath mode. Also change visitFNEG
to use isNegatibleForFree/GetNegatedExpression instead of doing a subset
of the same thing manually.

This fixes test/CodeGen/X86/negative-sin.ll.

llvm-svn: 37842
2007-07-02 15:48:56 +00:00
Dan Gohman
048c6f805b Add explicit keywords.
llvm-svn: 37839
2007-07-02 14:53:37 +00:00
Nick Lewycky
61fa7b9861 Fix undefined behaviour reported by the new --enable-expensive-checks option.
llvm-svn: 37829
2007-07-01 03:06:30 +00:00
Evan Cheng
35576789f3 (For Chris): Fix failure where we rejected compiling stubs when lazy compilation is disabled.
llvm-svn: 37825
2007-06-30 00:10:37 +00:00
Devang Patel
593a23252d Add loop info verification mechanism.
llvm-svn: 37822
2007-06-29 23:13:42 +00:00
Devang Patel
2a1af2196d Preserve DominanceFrontier.
llvm-svn: 37820
2007-06-29 23:11:49 +00:00
Evan Cheng
a1a06d1763 Only do FNEG xform when the vector type is a floating point type.
llvm-svn: 37818
2007-06-29 21:44:35 +00:00
David Greene
75e58e2207 Remove unused variables.
llvm-svn: 37816
2007-06-29 21:42:03 +00:00
Evan Cheng
a6add260b3 Fix a vector FP constant CSE bug.
llvm-svn: 37814
2007-06-29 21:36:04 +00:00
John Criswell
57e5ed4b5a Convert .cvsignore files
llvm-svn: 37801
2007-06-29 16:35:07 +00:00
David Greene
0942edd414 Remove unnecessary attributions in comments.
llvm-svn: 37799
2007-06-29 03:42:23 +00:00
David Greene
c176772093 Fix reference to iterator invalidated by an erase operation. Uncovered
by _GLIBCXX_DEBUG.

llvm-svn: 37796
2007-06-29 02:53:16 +00:00
David Greene
df6a87ea1c Fix reference to cached end iterator invalidated by an erase operation.
Uncovered by _GLIBCXX_DEBUG.

llvm-svn: 37795
2007-06-29 02:49:11 +00:00
David Greene
244fb44f6b Remove the "special tie breaker" because it resulted in inconsistent
ordering and thus violated the strict weak ordering requirement of
priority_queue.  Uncovered by _GLIBCXX_DEBUG.

llvm-svn: 37794
2007-06-29 02:48:09 +00:00
David Greene
ad230f223f Fix misue of iterator pointing to erased object. Uncovered by
_GLIBCXX_DEBUG.

llvm-svn: 37793
2007-06-29 02:45:24 +00:00
Devang Patel
8292a2ee90 Do not filter loop if candidate branch is in loop header.
llvm-svn: 37792
2007-06-29 01:39:53 +00:00
Evan Cheng
13b846b1ad Prevent PPC::BCC first operand, the PRED number, from being isel'd into a LI instruction.
llvm-svn: 37790
2007-06-29 01:25:06 +00:00
Owen Anderson
cff6ffe45c Add support for value numbering (but not actually optimizing) cast instructions.
llvm-svn: 37789
2007-06-29 00:51:03 +00:00
Owen Anderson
f134e54bb1 Add a type field to expressions in preparation for performing GVNPRE on casts.
llvm-svn: 37788
2007-06-29 00:40:05 +00:00
Evan Cheng
992f296a71 No vector fneg.
llvm-svn: 37786
2007-06-29 00:18:15 +00:00
Dan Gohman
ad9cbaba40 Fix an assertion failure in legalizing bitcast operators on targets where
vectors are split down to single elements as part of legalization.

llvm-svn: 37785
2007-06-29 00:09:08 +00:00
Evan Cheng
e233ec5e46 Type of vector extract / insert index operand should be iPTR.
llvm-svn: 37784
2007-06-29 00:01:20 +00:00
Owen Anderson
f1665858f3 Add support for performing GVNPRE on select instructions. This fixes test/Transforms/GVNPRE/select.ll.
llvm-svn: 37783
2007-06-28 23:51:21 +00:00
Dan Gohman
c6bdcfa8c0 Add new TargetLowering code to provide the final register type that an
illegal value type will be transformed to, for code that needs the
register type after all transformations instead of just after the first
transformation.

Factor out the code that uses this information to do copy-from-regs and
copy-to-regs for various purposes into separate functions so that they
are done consistently.

llvm-svn: 37781
2007-06-28 23:29:44 +00:00
Lauro Ramos Venancio
04172124dd Fix a bug in my previous patch.
llvm-svn: 37778
2007-06-28 20:06:38 +00:00
Lauro Ramos Venancio
eb29d717b3 When linking two modules, we should copy the alias.
llvm-svn: 37776
2007-06-28 19:02:54 +00:00
Devang Patel
03d844eebd - Undo previous check and allow loop switch for condtion that is not inside
loop.
- Avoid loop unswich for loop header branch.
- While cloning dominators fix typo and handle self dominating blocks.

llvm-svn: 37772
2007-06-28 02:05:46 +00:00
Devang Patel
7f468af921 Update LoopUnswitch pass to preserve DomiantorTree.
llvm-svn: 37771
2007-06-28 00:49:00 +00:00
Devang Patel
50d5420cdc If a condition is not inside a loop then the condition is suitable
to loop unswitch candidate for the loop.

llvm-svn: 37770
2007-06-28 00:44:10 +00:00
Owen Anderson
9372f36b3c Make many sets a much more reasonable size. This decreases the time to optimize
Anton's testcase from 35.5s to 34.7s.

llvm-svn: 37769
2007-06-28 00:34:34 +00:00
Bill Wendling
cc1f4cafa2 Set implied features based upon the CPU's feature list.
llvm-svn: 37768
2007-06-27 23:34:06 +00:00
Devang Patel
28d2851f39 Remove ETForest.
llvm-svn: 37765
2007-06-27 20:53:52 +00:00
Evan Cheng
e67385d712 If a livein is not used in the block. It's live through.
llvm-svn: 37764
2007-06-27 18:47:28 +00:00
Evan Cheng
26542e347a Partial fix for PR1502: If a EH register is needed in a successor of landing pad, add it as livein to all the blocks in the paths between the landing pad and the specified block.
llvm-svn: 37763
2007-06-27 18:45:32 +00:00
Owen Anderson
97dd99d761 Use cached information that has already been computed to make clean() simpler and faster. This is a small speedup on most cases.
llvm-svn: 37761
2007-06-27 17:38:29 +00:00
Owen Anderson
a7927caa56 Fold a lot of code into two cases: binary instructions and ternary instructions.
This saves many lines of code duplication.  No functionality change.

llvm-svn: 37759
2007-06-27 17:03:03 +00:00
Dan Gohman
cb89e19a6d Rename ("shrinkify") MVT::isExtendedValueType to MVT::isExtendedVT.
llvm-svn: 37758
2007-06-27 16:08:04 +00:00
Dan Gohman
ce1bca0bf9 Remove a redundant newline in the asm output for ELF .rodata sections.
llvm-svn: 37756
2007-06-27 15:09:47 +00:00
Dan Gohman
c1c4b0972f Use getVectorTypeBreakdown in FunctionLoweringInfo::CreateRegForValue
to compute the number and type of registers needed for vector values
instead of computing it manually. This fixes PR1529.

llvm-svn: 37755
2007-06-27 14:34:07 +00:00
Dan Gohman
69a6154359 Make the comment for ScalarizeVectorOp mention that it is only for use
with single-element vectors.

llvm-svn: 37752
2007-06-27 14:06:22 +00:00
Zhou Sheng
011fc80616 Fix a bug.
llvm-svn: 37751
2007-06-27 09:50:26 +00:00
Duraid Madina
d32d8b9726 ok, this is something of a dirty hack, but it seems to work. (fixes e.g.
the SPASS miscompilation)

llvm-svn: 37750
2007-06-27 09:01:14 +00:00
Duraid Madina
73b0d188c8 ok, this much doesn't seem to bork anything
llvm-svn: 37749
2007-06-27 08:31:07 +00:00
Duraid Madina
94cd67290b revert evan's fixes (and my doofusness) since they had a huge code
quality hit. will look at this soon.

llvm-svn: 37748
2007-06-27 08:11:59 +00:00
Duraid Madina
c0d3c96333 pull evan's fixes - should help the nightly tester (but there are still
some issues)

llvm-svn: 37747
2007-06-27 07:07:13 +00:00
Evan Cheng
480cd89fa1 Replace std::set with SmallPtrSet.
llvm-svn: 37746
2007-06-27 05:23:00 +00:00