1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

84045 Commits

Author SHA1 Message Date
Jack Carter
32420dd092 The define for 64 bit sign extension neglected to
initialize fields of the class that it used.

The result was nonsense code.

Before:
0000000000000000 <foo>:
   0:    00441100     0x441100
   4:    03e00008     jr    ra
   8:    00000000     nop

After:
0000000000000000 <foo>:
   0:    00041000     sll    v0,a0,0x0
   4:    03e00008     jr    ra
   8:    00000000     nop 

llvm-svn: 161377
2012-08-07 00:35:22 +00:00
Bill Wendling
dc532577fd Constify the Type parameter to some methods (which are const anyway).
llvm-svn: 161371
2012-08-07 00:26:35 +00:00
Andrew Trick
35b938c991 Allow x86 subtargets to use the GenericModel defined in X86Schedule.td.
This allows codegen passes to query properties like
InstrItins->SchedModel->IssueWidth. It also ensure's that
computeOperandLatency returns the X86 defaults for loads and "high
latency ops". This should have no significant impact on existing
schedulers because X86 defaults happen to be the same as global
defaults.

llvm-svn: 161370
2012-08-07 00:25:30 +00:00
Jack Carter
d768975885 Mips relocation R_MIPS_64 relocates a 64 bit double word.
I hit this in a very large program (spirit.cpp), but 
have not figured out how to make a small make check
test for it.

llvm-svn: 161366
2012-08-07 00:01:14 +00:00
Jack Carter
3f30c3effe The Mips64InstrInfo.td definitions DynAlloc64 LEA_ADDiu64
were using a class defined for 32 bit instructions and 
thus the instruction was for addiu instead of daddiu.

This was corrected by adding the instruction opcode as a 
field in the  base class to be filled in by the defs.

llvm-svn: 161359
2012-08-06 23:29:06 +00:00
Bill Wendling
efdb610522 Reduce indentation by early exiting.
llvm-svn: 161356
2012-08-06 22:52:45 +00:00
Jakob Stoklund Olesen
8d107f3948 Fix typo.
llvm-svn: 161354
2012-08-06 22:34:51 +00:00
Bill Wendling
dd05d04260 Add a way to grab the target options from the LTO command line.
When the command line target options were removed from the LLVM libraries, LTO
lost its ability to specify things like `-disable-fp-elim'. Add this back by
adding the command line variables to the `lto' project.
<rdar://problem/12038729>

llvm-svn: 161353
2012-08-06 21:34:54 +00:00
Jack Carter
fdb00bef02 Mips relocations R_MIPS_HIGHER and R_MIPS_HIGHEST.
These 2 relocations gain access to the 
highest and the second highest 16 bits
of a 64 bit object.

R_MIPS_HIGHER %higher(A+S)
The %higher(x) function is [ (((long long) x + 0x80008000LL) >> 32) & 0xffff ]. 

R_MIPS_HIGHEST %highest(A+S)
The %highest(x) function is [ (((long long) x + 0x800080008000LL) >> 48) & 0xffff ]. 

llvm-svn: 161348
2012-08-06 21:26:03 +00:00
Hal Finkel
15265edebe MFTB on PPC64 should really be encoded using MFSPR.
The MFTB instruction itself is being phased out, and its functionality
is provided by MFSPR. According to the ISA docs, using MFSPR works on all known
chips except for the 601 (which did not have a timebase register anyway)
and the POWER3.

Thanks to Adhemerval Zanella for pointing this out!

llvm-svn: 161346
2012-08-06 21:21:44 +00:00
Eric Christopher
f5132794cd Add support for the OpenBSD for Bitrig.
Patch by David Hill.

llvm-svn: 161344
2012-08-06 20:52:18 +00:00
Simon Atanasyan
03f8384c4e Fix MIPS DSP Rev1 intrinsics memory properties.
The patch reviewed by Akira Hatanaka.

llvm-svn: 161332
2012-08-06 19:47:47 +00:00
Jakob Stoklund Olesen
2bb405a329 Put up warning signs around MO::getNextOperandForReg().
llvm-svn: 161329
2012-08-06 18:48:43 +00:00
Roman Divacky
59eec94f55 Remove empty overrides of processFunctionBeforeFrameFinalized().
llvm-svn: 161328
2012-08-06 18:14:18 +00:00
Craig Topper
dc1b95e7de Implement proper handling for pcmpistri/pcmpestri intrinsics. Requires custom handling in DAGISelToDAG due to limitations in TableGen's implicit def handling. Fixes PR11305.
llvm-svn: 161318
2012-08-06 06:22:36 +00:00
Craig Topper
7a2d94e7d0 Update test to check for r161305
llvm-svn: 161307
2012-08-05 09:06:28 +00:00
Craig Topper
e26b30c830 Remove custom inserter for MWAIT. It doesn't do anything that couldn't be represented in a pattern.
llvm-svn: 161306
2012-08-05 00:36:57 +00:00
Craig Topper
c716a3f554 Use a COPY node instead of an explicit MOVA opcode in the custom insterter for pcmpestrm/pcmpistrm. Allows the register allocator to handle it better and prevent wasted identity moves.
llvm-svn: 161305
2012-08-05 00:17:48 +00:00
Hal Finkel
aadd19de06 Add readcyclecounter lowering on PPC64.
On PPC64, this can be done with a simple TableGen pattern.
To enable this, I've added the (otherwise missing) readcyclecounter
SDNode definition to TargetSelectionDAG.td.

llvm-svn: 161302
2012-08-04 14:10:46 +00:00
Anton Korobeynikov
b0d4fe0a5e Skip impdef regs during eabi save/restore list emission to workaround PR11902
llvm-svn: 161301
2012-08-04 13:25:58 +00:00
Anton Korobeynikov
dca34647bc Recognize vst1.64 / vld1.64 with 3 and 4 regs as load from / store to stack stuff
(this corresponds by spilling/reloading regs in DTriple / DQuad reg classes).
No testcase, found by inspection.

llvm-svn: 161300
2012-08-04 13:22:14 +00:00
Anton Korobeynikov
6dd5c91aae Add stack spill / reload instructions for DTriple and DQuad register classes, which
were missed for no reason. This fixes PR13377

llvm-svn: 161299
2012-08-04 13:16:12 +00:00
Bill Wendling
5e0afec8b6 Remove extraneous ';'.
llvm-svn: 161298
2012-08-04 10:31:40 +00:00
Benjamin Kramer
65e524a766 Update cmake build.
llvm-svn: 161297
2012-08-04 09:52:39 +00:00
Benjamin Kramer
c1a7151fa1 Postpone the deletion of the old name in StructType::setName to allow using a slice of the old name.
Fixes PR13522. Add a rudimentary unit test to exercise the behavior.

llvm-svn: 161296
2012-08-04 09:47:02 +00:00
NAKAMURA Takumi
d7acba5c24 [CMake] add_lit_target: Remove comments about add_dependencies. It is not a bug in cmake that add_custom_target(DEPENDS) would not accept targets but file-level dependencies.
llvm-svn: 161295
2012-08-04 02:14:44 +00:00
NAKAMURA Takumi
eb88bde151 llc: Try to suppress failures since r161262 .
FIXME: Fix several tests on i686-win32 due to lacking of many libraries.
llvm-svn: 161292
2012-08-04 01:29:37 +00:00
Jakob Stoklund Olesen
d5b3babd6f Delete a dead variable.
TwoAddressInstructionPass doesn't remat any more.

llvm-svn: 161285
2012-08-04 00:04:03 +00:00
Jakob Stoklund Olesen
69611c470c TwoAddressInstructionPass refactoring: Extract another method.
llvm-svn: 161284
2012-08-03 23:57:58 +00:00
Bob Wilson
9f6e25017a Refactor and check "onlyReadsMemory" before optimizing builtins.
This patch is mostly just refactoring a bunch of copy-and-pasted code, but
it also adds a check that the call instructions are readnone or readonly.
That check was already present for sin, cos, sqrt, log2, and exp2 calls, but
it was missing for the rest of the builtins being handled in this code.

llvm-svn: 161282
2012-08-03 23:29:17 +00:00
Jakob Stoklund Olesen
7713568689 TwoAddressInstructionPass refactoring: Extract a method.
No functional change intended, except replacing a DenseMap with a
SmallDenseMap which should behave identically.

llvm-svn: 161281
2012-08-03 23:25:45 +00:00
Jakob Stoklund Olesen
643fdb449e Begin adding support for updating LiveIntervals in TwoAddressInstructionPass.
This is far from complete, and only changes behavior when the
-early-live-intervals flag is passed to llc.

llvm-svn: 161273
2012-08-03 22:58:34 +00:00
Akira Hatanaka
ebbe0eff91 1. Redo mips16 instructions to avoid multiple opcodes for same instruction.
Change these to patterns.
2. Add another 16 instructions.

Patch by Reed Kotler.

llvm-svn: 161272
2012-08-03 22:57:02 +00:00
Jakob Stoklund Olesen
14c88af5f2 Add an experimental -early-live-intervals option.
This option runs LiveIntervals before TwoAddressInstructionPass which
will eventually learn to exploit and update the analysis.

Eventually, LiveIntervals will run before PHIElimination, and we can get
rid of LiveVariables.

llvm-svn: 161270
2012-08-03 22:12:54 +00:00
Jakob Stoklund Olesen
1e192f98dd Delete merged physreg copies in joinReservedPhysReg().
Previously, the identity copy would survive through register allocation
before it was removed by the rewriter.

llvm-svn: 161269
2012-08-03 22:12:51 +00:00
Bob Wilson
7e2fb62620 Try to reduce the compile time impact of r161232.
The previous change caused fast isel to not attempt handling any calls to
builtin functions.  That included things like "printf" and caused some
noticable regressions in compile time.  I wanted to avoid having fast isel
keep a separate list of functions that had to be kept in sync with what the
code in SelectionDAGBuilder.cpp was handling.  I've resolved that here by
moving the list into TargetLibraryInfo.  This is somewhat redundant in
SelectionDAGBuilder but it will ensure that we keep things consistent.

llvm-svn: 161263
2012-08-03 21:26:24 +00:00
Bob Wilson
7d92f01d57 Fix memcmp code-gen to honor -fno-builtin.
I noticed that SelectionDAGBuilder::visitCall was missing a check for memcmp
in TargetLibraryInfo, so that it would use custom code for memcmp calls even
with -fno-builtin.  I also had to add a new -disable-simplify-libcalls option
to llc so that I could write a test for this.

llvm-svn: 161262
2012-08-03 21:26:18 +00:00
Jakob Stoklund Olesen
bf7a000191 Completely eliminate VNInfo flags.
The 'unused' state of a value number can be represented as an invalid
def SlotIndex. This also exposed code that shouldn't have been looking
at unused value VNInfos.

llvm-svn: 161258
2012-08-03 20:59:32 +00:00
Jakob Stoklund Olesen
9af03604de Fix a couple of loops that were processing unused value numbers.
Unused VNInfos should be left alone. Their def SlotIndex doesn't point
to anything.

llvm-svn: 161257
2012-08-03 20:59:29 +00:00
Matt Beaumont-Gay
acc7302f80 Silence unused variable warning in -asserts build
llvm-svn: 161256
2012-08-03 20:54:11 +00:00
Jakob Stoklund Olesen
38aec46f18 Eliminate the VNInfo::hasPHIKill() flag.
The only real user of the flag was removeCopyByCommutingDef(), and it
has been switched to LiveIntervals::hasPHIKill().

All the code changed by this patch was only concerned with computing and
propagating the flag.

llvm-svn: 161255
2012-08-03 20:19:44 +00:00
Jakob Stoklund Olesen
74dfaec8d7 Make the hasPHIKills flag a computed property.
The VNInfo::HAS_PHI_KILL is only half supported. We precompute it in
LiveIntervalAnalysis, but it isn't properly updated by live range
splitting and functions like shrinkToUses().

It is only used in one place: RegisterCoalescer::removeCopyByCommutingDef().

This patch changes that function to use a new LiveIntervals::hasPHIKill()
function that computes the flag for a given value number.

llvm-svn: 161254
2012-08-03 20:10:24 +00:00
Eric Christopher
036c15bb42 Add a configure flag for enabling -Werror on the command line
while building as requested by Lang.

llvm-svn: 161253
2012-08-03 19:58:20 +00:00
Eric Christopher
f0a677b9e8 Add support for detecting libxml for Dmitri's work. He'll
commit code in clang that uses this shortly.

llvm-svn: 161252
2012-08-03 19:47:19 +00:00
Eric Christopher
663729d72c Add a configure option to pass -std=c++11 on the command line.
rdar://11366674

llvm-svn: 161251
2012-08-03 19:47:14 +00:00
Jakob Stoklund Olesen
042f08bb5d Remove a dead prototype.
llvm-svn: 161250
2012-08-03 18:34:32 +00:00
Eric Christopher
2453f7153a Revert previous patch here, we should instead configure in specific
packages for particular uses.

llvm-svn: 161246
2012-08-03 17:45:31 +00:00
Jakob Stoklund Olesen
df448a4b76 Delete dead function.
llvm-svn: 161242
2012-08-03 15:21:21 +00:00
Jakob Stoklund Olesen
95dc0b7b93 Don't delete dead code in TwoAddressInstructionPass.
This functionality was added before we started running
DeadMachineInstructionElim on all targets. It serves no purpose now.

llvm-svn: 161241
2012-08-03 15:11:57 +00:00
Gabor Greif
0c8708dd91 allow 'make CPPFLAGS=<something>' work again
this makes this hack a bit more bearable
for poor souls who need to pass custom
preprocessor flags to the build process

llvm-svn: 161240
2012-08-03 13:31:24 +00:00