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

86061 Commits

Author SHA1 Message Date
Nadav Rotem
04f3086065 1. Fix a bug in getTypeConversion. When a *simple* type is split, we need to return the type of the split result.
2. Change the maximum vectorization width from 4 to 8.
3. A test for both.

llvm-svn: 166864
2012-10-27 04:11:32 +00:00
Quentin Colombet
bcd2bc3437 [code size][ARM] Emit regular call instructions instead of the move, branch sequence
llvm-svn: 166854
2012-10-27 01:10:17 +00:00
Reed Kotler
cc41464454 Implement MipsHi for mips16
llvm-svn: 166852
2012-10-27 00:57:14 +00:00
Akira Hatanaka
a2ae72bd2f [mips] Do not tail-call optimize vararg functions or functions with byval
arguments.

This is rather conservative and should be fixed later to be more aggressive.

llvm-svn: 166851
2012-10-27 00:56:56 +00:00
Akira Hatanaka
4d26f60ca0 [mips] Make sure FuncArg doesn't advance when OrigArgIndex is the same as in the
previous iteration.

llvm-svn: 166850
2012-10-27 00:44:39 +00:00
Akira Hatanaka
f04bcd095c Use the methods and classes that were added to simplify LowerCall and
LowerFormalArguments in MipsTargetLowering.

No functionality change intended.

llvm-svn: 166846
2012-10-27 00:29:43 +00:00
Akira Hatanaka
3cd01228a7 Add method MipsTargetLowering::writeVarArgRegs which copies argument registers
of vararg functions back to the stack.

llvm-svn: 166844
2012-10-27 00:21:13 +00:00
Akira Hatanaka
7713c406cf Add method MipsTargetLowering::passByValArg.
This method emits nodes for passing byval arguments in registers and stack.
This has the same functionality as existing functions PassByValArg64 and
WriteByValArg which will be deleted later.

llvm-svn: 166843
2012-10-27 00:16:36 +00:00
Akira Hatanaka
5b7f71dcfc Add method MipsTargetLowering::copyByValRegs.
This method copies byval arguments passed in registers onto the stack and has
the same functionality as existing functions CopyMips64ByValRegs and
ReadByValArg which will be deleted later.

llvm-svn: 166841
2012-10-27 00:10:18 +00:00
Akira Hatanaka
32f472529e Add class MipsCC which provides methods used to analyze formal and call
arguments and inquire about calling convention information.

llvm-svn: 166840
2012-10-26 23:56:38 +00:00
Akira Hatanaka
d206b7dcb3 Delete MipsFunctionInfo::InArgFIRange.
llvm-svn: 166837
2012-10-26 23:49:51 +00:00
Nadav Rotem
133e437c48 Refactor the VectorTargetTransformInfo interface.
Add getCostXXX calls for different families of opcodes, such as casts, arithmetic, cmp, etc.

Port the LoopVectorizer to the new API.

The LoopVectorizer now finds instructions which will remain uniform after vectorization. It uses this information when calculating the cost of these instructions.

llvm-svn: 166836
2012-10-26 23:49:28 +00:00
Jakob Stoklund Olesen
4b4db880a3 Revert r163298 "Optimize codegen for VSETLNi{8,16,32} operating on Q registers."
Keep the integer_insertelement test case, the new coalescer can handle
this kind of lane insertion without help from pseudo-instructions.

llvm-svn: 166835
2012-10-26 23:39:46 +00:00
Kaelyn Uhrain
601e3b457f Avoid an unused-variable warning when asserts are disabled.
llvm-svn: 166834
2012-10-26 23:28:41 +00:00
Jakob Stoklund Olesen
3831f9f19f Reduce indentation with early exit.
No functional change.

llvm-svn: 166829
2012-10-26 23:05:13 +00:00
Jakob Stoklund Olesen
74618f417a Also make the current basic block a class member.
Don't pass it around everywhere as a function argument.

llvm-svn: 166828
2012-10-26 23:05:10 +00:00
Reed Kotler
8721a311b3 implement mips16 tls global addr
llvm-svn: 166827
2012-10-26 22:57:32 +00:00
Lang Hames
a2fffc78e7 MCRegisterClass should be returned by const ref, not by value.
llvm-svn: 166822
2012-10-26 22:14:10 +00:00
Jordan Rose
c9ba5a38bb Suggest llvm_unreachable over assert(0).
llvm-svn: 166821
2012-10-26 22:08:46 +00:00
Jakob Stoklund Olesen
cdf3df4595 Make the Processed set a class member.
Don't pass it everywhere as an argument.

llvm-svn: 166820
2012-10-26 22:06:00 +00:00
Chad Rosier
9ed4ab0c64 [ms-inline asm] Add a comment.
llvm-svn: 166819
2012-10-26 22:01:25 +00:00
Jakob Stoklund Olesen
c02a8906fc 80 col.
llvm-svn: 166818
2012-10-26 21:46:57 +00:00
Jakob Stoklund Olesen
4cf10d7d78 Remove ARMBaseRegisterInfo::isReservedReg().
It is just as easy to use MRI::isReserved() now.

llvm-svn: 166817
2012-10-26 21:43:05 +00:00
Jakob Stoklund Olesen
1a8c00078d Add GPRPair Register class to ARM.
Some instructions in ARM require 2 even-odd paired GPRs. This
patch adds support for such register class.

Patch by Weiming Zhao!

llvm-svn: 166816
2012-10-26 21:29:15 +00:00
Jakob Stoklund Olesen
b472c496e5 Fix whitespace and function names to be coding standardy.
No functional change.

llvm-svn: 166814
2012-10-26 21:12:49 +00:00
Jakob Stoklund Olesen
1875c109c5 Remove the canCombineSubRegIndices() target hook.
The new coalescer can already do all of this, so there is no need to
duplicate the efforts.

llvm-svn: 166813
2012-10-26 20:38:19 +00:00
Benjamin Kramer
0f18b5e49c Remove LoopDependenceAnalysis.
It was unmaintained and not much more than a stub. The new DependenceAnalysis
pass is both more general and complete.

llvm-svn: 166810
2012-10-26 20:25:01 +00:00
Bill Wendling
e6c62b245f Remove the unneeded initializers.
llvm-svn: 166804
2012-10-26 19:52:54 +00:00
Derek Schuff
e93c168939 Stop APInt::shl from generating llvm.trap
APInt::shl generated llvm.trap to guard against shifts greater than bit-width.
This was already checked with an assert, and there was a special case for
shifts equal to bit-width. Modify this check to catch shifts greater than or
equal to bit-width, so llvm.trap isn't generated.

Patch contributed by JF Bastien

llvm-svn: 166803
2012-10-26 19:52:27 +00:00
Hal Finkel
9cb3d9d08c Move target-specific BBVectorize tests into a separate directory.
llvm-svn: 166802
2012-10-26 19:38:09 +00:00
Nadav Rotem
137991e110 Move the target-specific tests, which require specific backends, to dirs that only run if the target is present.
llvm-svn: 166796
2012-10-26 18:52:01 +00:00
Rafael Espindola
4b51029c9e Change the internalize pass to internalize all symbols when given an empty
list of externals. This makes sense since a shared library with no symbols
can still be useful if it has static constructors.

llvm-svn: 166795
2012-10-26 18:47:48 +00:00
Benjamin Kramer
ce620a261d Lowercase the argument for TargetTransformInfo so it's consistent with all other passes.
llvm-svn: 166794
2012-10-26 18:46:15 +00:00
Chad Rosier
723bdcf38c [ms-inline asm] Emit an error for unsupported SIZE and LENGTH directives.
Part of rdar://12576868

llvm-svn: 166792
2012-10-26 18:32:44 +00:00
Chad Rosier
3f9673a66a [ms-inline asm] Add support for the TYPE operator.
Part of rdar://12576868

llvm-svn: 166790
2012-10-26 18:04:20 +00:00
Benjamin Kramer
f61bfc227a LoopSimplify: Preserve DependenceAnalysis.
This is currently true, but may change when DA grows more aggressive caching.
Without this setting it's impossible to use DA from a LoopPass because DA is a
function pass and cannot be properly scheduled in between LoopPasses. The
LoopManager reacts to this with an infinite loop which made this really annoying
to debug.

llvm-svn: 166788
2012-10-26 17:40:50 +00:00
Benjamin Kramer
f1e6d84f01 Fix SCEV cache invalidation in LCSSA and LoopSimplify.
The LoopSimplify bug is pretty harmless because the loop goes from unanalyzable
to analyzable but the LCSSA bug is very nasty. It only comes into play with a
specific order of the LoopPassManager worklist and can cause actual
miscompilations, when a SCEV refers to a value that has been replaced with PHI
node. SCEVExpander may then insert code into the wrong place, either violating
domination or randomly miscompiling stuff.

Comes with an extensive test case reduced from the test-suite with
bugpoint+SCEVValidator.

llvm-svn: 166787
2012-10-26 17:31:43 +00:00
Benjamin Kramer
9814156c2a Add a basic verifier for SCEV's backedge taken counts.
Enabled with -verify-scev. This could be extended significantly but hopefully
catches the common cases now. Note that it's not enabled by default in any
configuration because the way it tries to distinguish SCEVs is still fragile and
may produce false positives. Also the test-suite isn't clean yet, one example
is that it fails if a pass drops an NSW bit but it's still present in SCEV's
cached. Cleaning up all those cases will take some time.

llvm-svn: 166786
2012-10-26 17:31:32 +00:00
Nadav Rotem
a2f4e0d8a5 Fix a crash in SimpliftDemandedBits of vectors of pointers.
PR14183.

llvm-svn: 166785
2012-10-26 17:17:05 +00:00
Akira Hatanaka
573c240bcf Make sure I is not the end iterator when isInsideBundle is called.
llvm-svn: 166784
2012-10-26 17:11:42 +00:00
Reed Kotler
1e01dd723e (no commit message)
llvm-svn: 166780
2012-10-26 16:18:19 +00:00
Chad Rosier
bcf86ecdf2 [ms-inline asm] Have the target AsmParser create the asmrewrite for the offsetof
operator.

llvm-svn: 166779
2012-10-26 16:09:20 +00:00
Renato Golin
4829f04838 Better handling of OpcodeToISD using enum/switch.
Patch by Pasi Parviainen <pasi.parviainen@iki.fi>

llvm-svn: 166773
2012-10-26 12:24:52 +00:00
Joerg Sonnenberger
230b3a77a8 Don't explicitly require RTTI and EH.
llvm-svn: 166772
2012-10-26 12:15:29 +00:00
Adhemerval Zanella
0c35c65808 PowerPC: Fix for rldcl/rldicl/rldicr MC emission
This patch fixes the rldcl/rldicl/rldicr instruction emission. The issue is
the MDForm_1 instruction defines the PowerISA MB field from 'rldicl'
with the name MBE, but RLDCL/RLDICL/RLDICR definition uses as 'MB'.

It end up by generatint the 'rldicl' enconding at 
'lib/Target/PowerPC/PPCGenMCCodeEmitter.inc' to use the fourth argument as the
third. The patch changes it by adjusting to use the fourth argument as
intended.

Fixes PR14180.

llvm-svn: 166770
2012-10-26 12:09:58 +00:00
David Tweed
8265aeda87 Minor enhancement to build process notes for ARM platforms.
llvm-svn: 166769
2012-10-26 12:09:47 +00:00
Joerg Sonnenberger
0883439b39 Adjust llvm-ar and llvm-ranlib to not depend on exception handling.
Always use an exit code of 1, but print the help message if useful.
Remove the exception handling tag in llvm-as, llvm-dis and
llvm-bcanalyzer, where it isn't used.

llvm-svn: 166767
2012-10-26 10:49:15 +00:00
Nicolas Geoffray
1686dadb90 Remove GC roots that reference dead objects.
llvm-svn: 166763
2012-10-26 09:15:55 +00:00
Nicolas Geoffray
4945aaa7dd Fix CPP backend for method attributes by creating a block where a new AttrBuilder is defined for each attribute.
llvm-svn: 166762
2012-10-26 09:14:38 +00:00
Bill Wendling
7877df8be1 Alphabetize the enum list.
llvm-svn: 166760
2012-10-26 07:08:58 +00:00