oota-llvm.git
11 years agoAdd some class documentation to BinaryRef.
Sean Silva [Thu, 6 Jun 2013 00:47:12 +0000 (00:47 +0000)]
Add some class documentation to BinaryRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183362 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCache the TargetLowering info object as a pointer.
Bill Wendling [Thu, 6 Jun 2013 00:43:09 +0000 (00:43 +0000)]
Cache the TargetLowering info object as a pointer.

Caching it as a pointer allows us to reset it if the TargetMachine object
changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183361 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse IRBuilder instead of ConstantInt methods.
Jakub Staszak [Thu, 6 Jun 2013 00:37:23 +0000 (00:37 +0000)]
Use IRBuilder instead of ConstantInt methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183360 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't cache the TargetLoweringInfo object inside of the FunctionLowering object.
Bill Wendling [Thu, 6 Jun 2013 00:11:39 +0000 (00:11 +0000)]
Don't cache the TargetLoweringInfo object inside of the FunctionLowering object.

The TargetLoweringInfo object is owned by the TargetMachine. In the future, the
TargetMachine object may change, which may also change the TargetLoweringInfo
object.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183356 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRename operator== parameter to `RHS`.
Sean Silva [Wed, 5 Jun 2013 23:58:14 +0000 (23:58 +0000)]
Rename operator== parameter to `RHS`.

The previous name `Ref` is overly generic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183354 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove error-prone methods of BinaryRef.
Sean Silva [Wed, 5 Jun 2013 23:55:26 +0000 (23:55 +0000)]
Remove error-prone methods of BinaryRef.

A user shouldn't care about the internal state, and these methods by
their very nature require asserting a predicate on the internal state.
As such, they cannot be used safely without introducing hidden
long-distance dependencies on the manner of construction of the
BinaryRef.

Use writeAsBinary(raw_ostream &) and writeAsHex(raw_ostream &) if you
need to access the data in a binary or hex format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183353 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd writeAsHex(raw_ostream &) method to BinaryRef.
Sean Silva [Wed, 5 Jun 2013 23:47:23 +0000 (23:47 +0000)]
Add writeAsHex(raw_ostream &) method to BinaryRef.

This hides the implementation. A future commit will remove the
error-prone getHex() and getBinary() methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183352 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Replace predicate loop with predicate function
Tom Stellard [Wed, 5 Jun 2013 23:39:50 +0000 (23:39 +0000)]
R600: Replace predicate loop with predicate function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183351 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRename BinaryRef::isBinary to more descriptive DataIsHexString.
Sean Silva [Wed, 5 Jun 2013 23:32:31 +0000 (23:32 +0000)]
Rename BinaryRef::isBinary to more descriptive DataIsHexString.

And add a doxygen comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183350 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd BinaryRef binary_size() method.
Sean Silva [Wed, 5 Jun 2013 23:32:27 +0000 (23:32 +0000)]
Add BinaryRef binary_size() method.

This avoids making assumptions about the data representation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183349 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoComment BinaryRef::Data.
Sean Silva [Wed, 5 Jun 2013 23:32:23 +0000 (23:32 +0000)]
Comment BinaryRef::Data.

Also, state an invariant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183348 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd space to assert message.
Bill Wendling [Wed, 5 Jun 2013 23:13:26 +0000 (23:13 +0000)]
Add space to assert message.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183346 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd writeAsBinary(raw_ostream &) method to BinaryRef.
Sean Silva [Wed, 5 Jun 2013 22:59:00 +0000 (22:59 +0000)]
Add writeAsBinary(raw_ostream &) method to BinaryRef.

Previously, yaml2coff.cpp had a writeHexData static helper function to
do this, but it is generally useful functionality.

Also, validate hex strings up-front to avoid running having to handle
errors "deep inside" the yaml2obj code (it also gives better diagnostics
than it used to).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183345 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Add a pass that merge Vector Register
Vincent Lejeune [Wed, 5 Jun 2013 21:38:04 +0000 (21:38 +0000)]
R600: Add a pass that merge Vector Register

Previously commited @183279 but tests were failing, reverted @183286
It was broken because @183336 was missing, now it's there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183343 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[docs] Add link to C++ ABI document.
Sean Silva [Wed, 5 Jun 2013 21:11:16 +0000 (21:11 +0000)]
[docs] Add link to C++ ABI document.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183342 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[docs] Add link to SysV ABI document.
Sean Silva [Wed, 5 Jun 2013 21:11:11 +0000 (21:11 +0000)]
[docs] Add link to SysV ABI document.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183341 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ELF] Add ELFOSABI_GNU.
Sean Silva [Wed, 5 Jun 2013 20:55:58 +0000 (20:55 +0000)]
[ELF] Add ELFOSABI_GNU.

ELFOSABI_LINUX is a historical alias for ELFOSABI_GNU according to
<http://www.sco.com/developers/gabi/latest/ch4.eheader.html>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183339 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't hide the first ELF symbol.
Rafael Espindola [Wed, 5 Jun 2013 20:33:54 +0000 (20:33 +0000)]
Don't hide the first ELF symbol.

The first symbol on ELF is dummy, but it has a defined content and readelf
normally displays it. With this change llvm-readobj also displays it and we
can check that llvm-mc output is correct according to the standard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183337 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Schedule copy from phys register at beginning of block
Vincent Lejeune [Wed, 5 Jun 2013 20:27:35 +0000 (20:27 +0000)]
R600: Schedule copy from phys register at beginning of block

It allows regalloc pass to remove them by trivially assigning associated reg

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183336 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoyaml2obj: split out COFF logic into separate file
Sean Silva [Wed, 5 Jun 2013 19:56:47 +0000 (19:56 +0000)]
yaml2obj: split out COFF logic into separate file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183335 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips] brcond + setgt/setugt instruction selection patterns.
Akira Hatanaka [Wed, 5 Jun 2013 19:49:55 +0000 (19:49 +0000)]
[mips] brcond + setgt/setugt instruction selection patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183334 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoyaml2obj: add -format=<fmt> to choose input YAML interpretation
Sean Silva [Wed, 5 Jun 2013 18:51:34 +0000 (18:51 +0000)]
yaml2obj: add -format=<fmt> to choose input YAML interpretation

See the comment in yaml2obj.cpp for why this is currently needed.
Eventually we can get rid of this, but for now it is needed in order to
make forward progress with adding ELF support, and should be
straightforward to remove later.

Also, preserve the default of COFF, to avoid breaking existing tests.
This policy can easily be changed later though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183332 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse IRBuilder instead of ConstantInt methods. It simplifies code a little bit.
Jakub Staszak [Wed, 5 Jun 2013 18:27:02 +0000 (18:27 +0000)]
Use IRBuilder instead of ConstantInt methods. It simplifies code a little bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183328 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PATCH] Fix VGATHER* operand constraints
Michael Liao [Wed, 5 Jun 2013 18:12:26 +0000 (18:12 +0000)]
[PATCH] Fix VGATHER* operand constraints

Add earlyclobber constaints to prevent input register being allocated as
the output register because, according to Intel spec [1], "If any pair
of the index, mask, or destination registers are the same, this
instruction results a UD fault."

---
[1] http://software.intel.com/sites/default/files/319433-014.pdf

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183327 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRepresent symbols with a SymbolIndex,SectionIndex pair.
Rafael Espindola [Wed, 5 Jun 2013 17:54:19 +0000 (17:54 +0000)]
Represent symbols with a SymbolIndex,SectionIndex pair.

With this patch we use the SectionIndex directly, instead of counting the
number of symbol tables. This saves a DenseMap lookup every time we want to
find which symbol a relocation refers to.

Also simplify based on the fact that there is at most one SHT_SYMTAB and one
SHT_DYNSYM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183326 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add more ALU and CMP instructions
Arnold Schwaighofer [Wed, 5 Jun 2013 16:36:51 +0000 (16:36 +0000)]
ARM sched model: Add more ALU and CMP instructions

Reapply of 183258.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183321 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add divsion, loads, branches, vfp cvt
Arnold Schwaighofer [Wed, 5 Jun 2013 16:06:11 +0000 (16:06 +0000)]
ARM sched model: Add divsion, loads, branches, vfp cvt

Add some generic SchedWrites and assign resources for Swift and Cortex A9.

Reapply of r183257. (Removed empty InstRW for division on swift)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183319 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARMInstrInfo: Improve isSwiftFastImmShift
Arnold Schwaighofer [Wed, 5 Jun 2013 14:59:36 +0000 (14:59 +0000)]
ARMInstrInfo: Improve isSwiftFastImmShift

An instruction with less than 3 inputs is trivially a fast immediate shift.

Reapply of 183256, should not have caused the tablegen segfault on linux either.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183314 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSubtargetEmitter fix
Arnold Schwaighofer [Wed, 5 Jun 2013 14:06:50 +0000 (14:06 +0000)]
SubtargetEmitter fix

Don't output data if we are supposed to ignore the record.

Reapply of 183255, I don't think this was causing the tablegen segfault on linux
testers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183311 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThis is a simple patch that changes RRX and RRXS to accept all registers as operands.
Mihai Popa [Wed, 5 Jun 2013 13:23:51 +0000 (13:23 +0000)]
This is a simple patch that changes RRX and RRXS to accept all registers as operands.
According to the ARM reference manual, RRX(S) have defined encodings for lr, pc and sp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183307 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThe GNU/HURD is also using the libc. Therefor, endian.h should be included, not machi...
Sylvestre Ledru [Wed, 5 Jun 2013 09:17:26 +0000 (09:17 +0000)]
The GNU/HURD is also using the libc. Therefor, endian.h should be included, not machine/endian.h. See full build log https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-3.3&arch=hurd-i386&ver=1%3A3.3~%2Brc3-1~exp1&stamp=1370358869

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183303 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix a tblgen subtargetemitter bug, for future Swift support.
Andrew Trick [Wed, 5 Jun 2013 06:55:20 +0000 (06:55 +0000)]
Fix a tblgen subtargetemitter bug, for future Swift support.

This fixes some of the ridiculously complex code for optimizing the
machine model tables that are shared among all processors of a given
target. A9 and Swift both use the "special" feature that maps old
itinerary classes to new machine model defs. They map different
overlapping subsets of instructions, which wasn't handled correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183302 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPR15662: Optimized debug info produces out of order function parameters
David Blaikie [Wed, 5 Jun 2013 05:39:59 +0000 (05:39 +0000)]
PR15662: Optimized debug info produces out of order function parameters

When a function is inlined we lazily construct the variables
representing the function's parameters. After that, we add any remaining
unused parameters.

If the function doesn't use all the parameters, or uses them out of
order, then the DWARF would produce them in that order, producing a
parameter order that doesn't match the source.

This fix causes us to always keep the arg variables at the start of the
variable list & in the original order from the source.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183297 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Make sure to schedule AR register uses and defs in the same clause
Tom Stellard [Wed, 5 Jun 2013 03:43:06 +0000 (03:43 +0000)]
R600: Make sure to schedule AR register uses and defs in the same clause

Reviewed-by: vljn at ovi.com
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183294 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't print default values for NumberOfAuxSymbols and AuxiliaryData.
Rafael Espindola [Wed, 5 Jun 2013 03:20:13 +0000 (03:20 +0000)]
Don't print default values for NumberOfAuxSymbols and AuxiliaryData.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183293 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoHandle (at least don't crash on) relocations with no symbols.
Rafael Espindola [Wed, 5 Jun 2013 02:55:01 +0000 (02:55 +0000)]
Handle (at least don't crash on) relocations with no symbols.

Should fix the MCJIT tests on PPC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183288 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMove BinaryRef to a new include/llvm/Object/YAML.h file.
Rafael Espindola [Wed, 5 Jun 2013 02:32:26 +0000 (02:32 +0000)]
Move BinaryRef to a new include/llvm/Object/YAML.h file.

It will be used for ELF dumping too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183287 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert "R600: Add a pass that merge Vector Register"
Rafael Espindola [Wed, 5 Jun 2013 01:48:30 +0000 (01:48 +0000)]
Revert "R600: Add a pass that merge Vector Register"

This reverts commit r183279. CodeGen/R600/texture-input-merge.ll was failing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183286 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoHandle relocations that don't point to symbols.
Rafael Espindola [Wed, 5 Jun 2013 01:33:53 +0000 (01:33 +0000)]
Handle relocations that don't point to symbols.

In ELF (as in MachO), not all relocations point to symbols. Represent this
properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj
ELF's dumper to handle relocatios without symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183284 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[docs] Replace non-existent LLVM_YAML_UNIQUE_TYPE() macro
Sean Silva [Tue, 4 Jun 2013 23:36:41 +0000 (23:36 +0000)]
[docs] Replace non-existent LLVM_YAML_UNIQUE_TYPE() macro

LLVM_YAML_STRONG_TYPEDEF() is the correct macro to perform this function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183280 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Add a pass that merge Vector Register
Vincent Lejeune [Tue, 4 Jun 2013 23:17:26 +0000 (23:17 +0000)]
R600: Add a pass that merge Vector Register

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183279 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Const/Neg/Abs can be folded to dot4
Vincent Lejeune [Tue, 4 Jun 2013 23:17:15 +0000 (23:17 +0000)]
R600: Const/Neg/Abs can be folded to dot4

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183278 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCortex-R5 can issue Thumb2 integer division instructions.
Evan Cheng [Tue, 4 Jun 2013 22:52:09 +0000 (22:52 +0000)]
Cortex-R5 can issue Thumb2 integer division instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183275 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert series of sched model patches until I figure out what is going on.
Arnold Schwaighofer [Tue, 4 Jun 2013 22:35:17 +0000 (22:35 +0000)]
Revert series of sched model patches until I figure out what is going on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183273 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add VFP div instruction on Swift
Arnold Schwaighofer [Tue, 4 Jun 2013 22:16:08 +0000 (22:16 +0000)]
ARM sched model: Add VFP div instruction on Swift

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183271 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add SIMD/VFP load/store instructions on Swift
Arnold Schwaighofer [Tue, 4 Jun 2013 22:16:07 +0000 (22:16 +0000)]
ARM sched model: Add SIMD/VFP load/store instructions on Swift

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183270 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add integer VFP/SIMD instructions on Swift
Arnold Schwaighofer [Tue, 4 Jun 2013 22:16:05 +0000 (22:16 +0000)]
ARM sched model: Add integer VFP/SIMD instructions on Swift

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183269 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add integer load/store instructions on Swift
Arnold Schwaighofer [Tue, 4 Jun 2013 22:16:04 +0000 (22:16 +0000)]
ARM sched model: Add integer load/store instructions on Swift

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183268 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add integer arithmetic instructions on Swift
Arnold Schwaighofer [Tue, 4 Jun 2013 22:16:02 +0000 (22:16 +0000)]
ARM sched model: Add integer arithmetic instructions on Swift

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183267 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Cortex A9 - More InstRW sched resources
Arnold Schwaighofer [Tue, 4 Jun 2013 22:16:00 +0000 (22:16 +0000)]
ARM sched model: Cortex A9 - More InstRW sched resources

Add more InstRW mappings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183266 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add branch thumb instructions
Arnold Schwaighofer [Tue, 4 Jun 2013 22:15:59 +0000 (22:15 +0000)]
ARM sched model: Add branch thumb instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183265 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add branch thumb2 instructions
Arnold Schwaighofer [Tue, 4 Jun 2013 22:15:57 +0000 (22:15 +0000)]
ARM sched model: Add branch thumb2 instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183264 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add branch instructions
Arnold Schwaighofer [Tue, 4 Jun 2013 22:15:56 +0000 (22:15 +0000)]
ARM sched model: Add branch instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183263 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add preload thumb2 instructions
Arnold Schwaighofer [Tue, 4 Jun 2013 22:15:54 +0000 (22:15 +0000)]
ARM sched model: Add preload thumb2 instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183262 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add preload instructions
Arnold Schwaighofer [Tue, 4 Jun 2013 22:15:52 +0000 (22:15 +0000)]
ARM sched model: Add preload instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183261 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add more ALU and CMP thumb instructions
Arnold Schwaighofer [Tue, 4 Jun 2013 22:15:51 +0000 (22:15 +0000)]
ARM sched model: Add more ALU and CMP thumb instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183260 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago ARM sched model: Add more ALU and CMP thumb2 instructions
Arnold Schwaighofer [Tue, 4 Jun 2013 22:15:49 +0000 (22:15 +0000)]
 ARM sched model: Add more ALU and CMP thumb2 instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183259 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add more ALU and CMP instructions
Arnold Schwaighofer [Tue, 4 Jun 2013 22:15:47 +0000 (22:15 +0000)]
ARM sched model: Add more ALU and CMP instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183258 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM sched model: Add divsion, loads, branches, vfp cvt
Arnold Schwaighofer [Tue, 4 Jun 2013 22:15:46 +0000 (22:15 +0000)]
ARM sched model: Add divsion, loads, branches, vfp cvt

Add some generic SchedWrites and assign resources for Swift and Cortex A9.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183257 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARMInstrInfo: Improve isSwiftFastImmShift
Arnold Schwaighofer [Tue, 4 Jun 2013 22:15:43 +0000 (22:15 +0000)]
ARMInstrInfo: Improve isSwiftFastImmShift

An instruction with less than 3 inputs is trivially a fast immediate shift.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183256 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSubtargetEmitter fix
Arnold Schwaighofer [Tue, 4 Jun 2013 22:15:41 +0000 (22:15 +0000)]
SubtargetEmitter fix

Don't output data if we are supposed to ignore the record.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183255 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix link.
Richard Smith [Tue, 4 Jun 2013 20:42:42 +0000 (20:42 +0000)]
Fix link.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183248 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSparc: No functionality change. Cleanup whitespaces, comment formatting etc.,
Venkatraman Govindaraju [Tue, 4 Jun 2013 18:33:25 +0000 (18:33 +0000)]
Sparc: No functionality change. Cleanup whitespaces, comment formatting etc.,

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183243 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoIndVarSimplify: check if loop invariant expansion can trap
David Majnemer [Tue, 4 Jun 2013 17:51:58 +0000 (17:51 +0000)]
IndVarSimplify: check if loop invariant expansion can trap

IndVarSimplify is willing to move divide instructions outside of their
loop bodies if they are invariant of the loop.  However, it may not be
safe to expand them if we do not know if they can trap.

Instead, check to see if it is not safe to expand the instruction and
skip the expansion.

This fixes PR16041.

Testcase by Rafael Ávila de Espíndola.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183239 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM: Fix crash in ARM backend inside of ARMConstantIslandPass
David Majnemer [Tue, 4 Jun 2013 17:46:15 +0000 (17:46 +0000)]
ARM: Fix crash in ARM backend inside of ARMConstantIslandPass

The ARM backend did not expect LDRBi12 to hold a constant pool operand.
Allow for LLVM to deal with the instruction similar to how it deals with
LDRi12.

This fixes PR16215.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183238 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove "-Wl,-seg1addr -Wl,0xE0000000" from link options.
Bob Wilson [Tue, 4 Jun 2013 15:26:37 +0000 (15:26 +0000)]
Remove "-Wl,-seg1addr -Wl,0xE0000000" from link options.

Specifying the load address for Darwin i386 dylibs was a performance
optimization for dyld that is not relevant for x86_64 or arm. We can just
remove this now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183230 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Swizzle texture/export instructions
Vincent Lejeune [Tue, 4 Jun 2013 15:04:53 +0000 (15:04 +0000)]
R600: Swizzle texture/export instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183229 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Add a test for r183108
Vincent Lejeune [Tue, 4 Jun 2013 15:03:35 +0000 (15:03 +0000)]
R600: Add a test for r183108

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183228 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSecond part of pr16069
Rafael Espindola [Tue, 4 Jun 2013 14:11:59 +0000 (14:11 +0000)]
Second part of pr16069

The problem this time seems to be a thinko. We were assuming that in the CFG

A
| \
|  B
| /
C

speculating the basic block B would cause only the phi value for the B->C edge
to be speculated. That is not true, the phi's are semantically in the edges, so
if the A->B->C path is taken, any code needed for A->C is not executed and we
have to consider it too when deciding to speculate B.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183226 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTypo: s/caes/cases/ in SimplifyCFG
Hans Wennborg [Tue, 4 Jun 2013 11:22:30 +0000 (11:22 +0000)]
Typo: s/caes/cases/ in SimplifyCFG

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183219 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPreserve const correctness.
Benjamin Kramer [Tue, 4 Jun 2013 09:09:15 +0000 (09:09 +0000)]
Preserve const correctness.

GCC complains about casting away const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183216 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTest commit for user vmedic, to verify commit access. One line of comment is added...
Vladimir Medic [Tue, 4 Jun 2013 08:28:53 +0000 (08:28 +0000)]
Test commit for user vmedic, to verify commit access. One line of comment is added to MipsAsmParser.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183215 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[llvm-symbolizer] Avoid calling slow getSymbolSize for Mach-O files. Assume that...
Alexey Samsonov [Tue, 4 Jun 2013 07:57:38 +0000 (07:57 +0000)]
[llvm-symbolizer] Avoid calling slow getSymbolSize for Mach-O files. Assume that symbols with zero size are in fact large enough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183213 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoWe are now in 3.4 land. We don't need the 3.3 releaese notes in ToT anymore.
Bill Wendling [Tue, 4 Jun 2013 06:12:31 +0000 (06:12 +0000)]
We are now in 3.4 land. We don't need the 3.3 releaese notes in ToT anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183210 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoIEEE-754R 5.7.2 General Operations is* operations (except for isCanonical).
Michael Gottesman [Tue, 4 Jun 2013 03:46:25 +0000 (03:46 +0000)]
IEEE-754R 5.7.2 General Operations is* operations (except for isCanonical).

Specifically the following work was done:

1. If the operation was not implemented, I implemented it.

2. If the operation was already implemented, I just moved its location
in the APFloat header into the IEEE-754R 5.7.2 section. If the name was
incorrect, I put in a comment giving the true IEEE-754R name.

Also unittests have been added for all of the functions which did not
already have a unittest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183179 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSilencing an MSVC warning about mixing bool and unsigned int.
Aaron Ballman [Tue, 4 Jun 2013 01:03:03 +0000 (01:03 +0000)]
Silencing an MSVC warning about mixing bool and unsigned int.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183176 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSilencing an MSVC warning about */ being found outside of a comment.
Aaron Ballman [Tue, 4 Jun 2013 01:01:56 +0000 (01:01 +0000)]
Silencing an MSVC warning about */ being found outside of a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183175 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix a defect in code-layout pass, improving Benchmarks/Olden/em3d/em3d by about 30%
Shuxin Yang [Tue, 4 Jun 2013 01:00:57 +0000 (01:00 +0000)]
Fix a defect in code-layout pass, improving Benchmarks/Olden/em3d/em3d by about 30%
(4.58s vs 3.2s on an oldish Mac Tower).

  The corresponding src is excerpted bellow. The lopp accounts for about 90% of execution time.
  --------------------
    cat -n test-suite/MultiSource/Benchmarks/Olden/em3d/make_graph.c
     90
     91         for (k=0; k<j; k++)
     92           if (other_node == cur_node->to_nodes[k]) break;

  The defective layout is sketched bellow, where the two branches need to swap.
  ------------------------------------------------------------------------
      L:
         ...
      if (cond) goto out-of-loop
      goto L

  While this code sequence is defective, I don't understand why it incurs 1/3 of
execution time. CPU-event-profiling indicates the poor laoyout dose not increase
in br-misprediction; it dosen't increase stall cycle at all, and it dosen't
prevent the CPU detect the loop (i.e. Loop-Stream-Detector seems to be working fine
as well)...

   The root cause of the problem is that the layout pass calls AnalyzeBranch()
with basic-block which is not updated to reflect its current layout.

rdar://13966341

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183174 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDelete dead safety check.
Nick Lewycky [Mon, 3 Jun 2013 23:15:20 +0000 (23:15 +0000)]
Delete dead safety check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183167 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSimplifyCFG: Do not transform PHI to select if doing so would be unsafe
David Majnemer [Mon, 3 Jun 2013 20:43:12 +0000 (20:43 +0000)]
SimplifyCFG: Do not transform PHI to select if doing so would be unsafe

PR16069 is an interesting case where an incoming value to a PHI is a
trap value while also being a 'ConstantExpr'.

We do not consider this case when performing the 'HoistThenElseCodeToIf'
optimization.

Instead, make our modifications more conservative if we detect that we
cannot transform the PHI to a select.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183152 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSimplifyCFG: Small cleanup, use ICmpInst::isEquality()
David Majnemer [Mon, 3 Jun 2013 20:39:50 +0000 (20:39 +0000)]
SimplifyCFG: Small cleanup, use ICmpInst::isEquality()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183151 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove dead code.
Rafael Espindola [Mon, 3 Jun 2013 19:42:57 +0000 (19:42 +0000)]
Remove dead code.

Thanks to Sean Silva for noticing it!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183148 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUpdate RuntimeDyldELF::findOPDEntrySection the new relocation iterators.
Rafael Espindola [Mon, 3 Jun 2013 19:37:34 +0000 (19:37 +0000)]
Update RuntimeDyldELF::findOPDEntrySection the new relocation iterators.

This was missing from r182908. I didn't noticed it at the time because the MCJIT tests were
disabled when building with cmake on ppc64 (which I fixed in r183143).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183147 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoEnable mcjit tests on ppc64 when building with cmake.
Rafael Espindola [Mon, 3 Jun 2013 19:17:21 +0000 (19:17 +0000)]
Enable mcjit tests on ppc64 when building with cmake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183143 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: Add support for work item and work group intrinsics
Tom Stellard [Mon, 3 Jun 2013 17:40:18 +0000 (17:40 +0000)]
R600/SI: Add support for work item and work group intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183138 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: Add a calling convention for compute shaders
Tom Stellard [Mon, 3 Jun 2013 17:40:11 +0000 (17:40 +0000)]
R600/SI: Add a calling convention for compute shaders

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183137 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: Custom lower i64 sign_extend
Tom Stellard [Mon, 3 Jun 2013 17:40:03 +0000 (17:40 +0000)]
R600/SI: Custom lower i64 sign_extend

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183136 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: Adjust some instructions' out register class after ISel
Tom Stellard [Mon, 3 Jun 2013 17:39:58 +0000 (17:39 +0000)]
R600/SI: Adjust some instructions' out register class after ISel

This is necessary to avoid generating VGPR to SGPR copies in some
cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183135 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: Handle REG_SEQUENCE in fitsRegClass()
Tom Stellard [Mon, 3 Jun 2013 17:39:54 +0000 (17:39 +0000)]
R600/SI: Handle REG_SEQUENCE in fitsRegClass()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183134 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: Handle nodes with glue results correctly SITargetLowering::foldOperands()
Tom Stellard [Mon, 3 Jun 2013 17:39:50 +0000 (17:39 +0000)]
R600/SI: Handle nodes with glue results correctly SITargetLowering::foldOperands()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183133 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: Fixup CopyToReg register class in PostprocessISelDAG()
Tom Stellard [Mon, 3 Jun 2013 17:39:46 +0000 (17:39 +0000)]
R600/SI: Fixup CopyToReg register class in PostprocessISelDAG()

The CopyToReg nodes will sometimes try to copy a value from a VGPR to an
SGPR.  This kind of copy is not possible, so we need to detect
VGPR->SGPR copies and do something else.  The current strategy is to
replace these copies with VGPR->VGPR copies and hope that all the users
of CopyToReg can accept VGPRs as arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183132 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: Add support for global loads
Tom Stellard [Mon, 3 Jun 2013 17:39:43 +0000 (17:39 +0000)]
R600/SI: Add support for global loads

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183131 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: Rework MUBUF store instructions
Tom Stellard [Mon, 3 Jun 2013 17:39:37 +0000 (17:39 +0000)]
R600/SI: Rework MUBUF store instructions

The lowering of stores is now mostly handled in the tablegen files.  No
more BUFFER_STORE nodes I generated during legalization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183130 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: 3 op instructions have no write bit but the result are store in PV
Vincent Lejeune [Mon, 3 Jun 2013 15:56:12 +0000 (15:56 +0000)]
R600: 3 op instructions have no write bit but the result are store in PV

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183111 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: CALL_FS consumes a stack size entry
Vincent Lejeune [Mon, 3 Jun 2013 15:44:42 +0000 (15:44 +0000)]
R600: CALL_FS consumes a stack size entry

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183108 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: use capital letter for PV channel
Vincent Lejeune [Mon, 3 Jun 2013 15:44:35 +0000 (15:44 +0000)]
R600: use capital letter for PV channel

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183107 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Constraints input regs of interp_xy,_zw
Vincent Lejeune [Mon, 3 Jun 2013 15:44:16 +0000 (15:44 +0000)]
R600: Constraints input regs of interp_xy,_zw

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183106 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[asan] ASan Linux MIPS32 support (llvm part), patch by Jyun-Yan Y
Kostya Serebryany [Mon, 3 Jun 2013 14:46:56 +0000 (14:46 +0000)]
[asan] ASan Linux MIPS32 support (llvm part), patch by Jyun-Yan Y

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183104 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoX86: sub_xmm registers are 128 bits wide.
Ahmed Bougacha [Mon, 3 Jun 2013 14:42:40 +0000 (14:42 +0000)]
X86: sub_xmm registers are 128 bits wide.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183103 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCorrect handling invalid filename in llvm-symbolizer
Alexey Samsonov [Mon, 3 Jun 2013 14:12:39 +0000 (14:12 +0000)]
Correct handling invalid filename in llvm-symbolizer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183102 91177308-0d34-0410-b5e6-96231b3b80d8