Commit Graph

191414 Commits

Author SHA1 Message Date
Eric Christopher 337262068f Replace some uses of getSubtargetImpl with the cached version
off of the MachineFunction or with the version that takes a
Function reference as an argument.

llvm-svn: 227185
2015-01-27 08:48:42 +00:00
Denis Protivensky f9d020d412 [ARM] Correctly use make_unhandled_reloc_error
llvm-svn: 227184
2015-01-27 08:47:15 +00:00
Denis Protivensky 9e4f87b329 [Mips] Fix createMipsRelocationHandler specialization (take 2)
Misread buildbot's log.
Both gcc and clang compile this fine.

Original fix reason:
gcc allows template specializations only in the same namespace
where template has been declared.

llvm-svn: 227183
2015-01-27 08:36:34 +00:00
Chandler Carruth 7b011df6f2 [PM] Clean up file banner comments prior to refactoring this code.
llvm-svn: 227182
2015-01-27 08:28:33 +00:00
Eric Christopher 7592b0c5e6 Have the PBQP register allocator use the subtarget on the MachineFunction.
(and remove an extraneous private).

llvm-svn: 227181
2015-01-27 08:27:06 +00:00
Eric Christopher e005826526 Remove some extraneous includes.
llvm-svn: 227180
2015-01-27 08:27:03 +00:00
Denis Protivensky 60f12026fb Revert "[Mips] Fix createMipsRelocationHandler specialization"
The buildbot reported build failures for clang.

llvm-svn: 227179
2015-01-27 08:22:07 +00:00
Eric Christopher ad6bedb43e Fix build failure with pointer vs reference.
NB: Saving files after editing helps.
llvm-svn: 227178
2015-01-27 08:00:42 +00:00
Denis Protivensky f6966505c3 [Mips] Fix createMipsRelocationHandler specialization
gcc allows template specializations only in the same namespace
where template has been declared.

llvm-svn: 227177
2015-01-27 07:56:25 +00:00
Eric Christopher 2c63549386 Update a few calls to getSubtarget<> to either be getSubtargetImpl
when we didn't need the cast to the base class or the cached version
off of the subtarget.

llvm-svn: 227176
2015-01-27 07:54:39 +00:00
Eric Christopher 36d9273128 Clean up the AArch64 store pair suppression pass initialization
and remove and unnecessary class variable.

llvm-svn: 227175
2015-01-27 07:54:36 +00:00
Denis Protivensky 2b5539651b [lld] Correct forming of ARM/Thumb atoms
Symbols addressing Thumb code have zero bit set in st_value to distinguish them from ARM instructions.
This caused wrong atoms' forming because of offset of one byte brought in by that corrected st_value.

Fixed reading of st_value & st_value-related things in ARMELFFile while forming atoms.
Symbol table generation is also fixed for Thumb atoms.

Differential Revision: http://reviews.llvm.org/D7161

llvm-svn: 227174
2015-01-27 07:39:04 +00:00
Eric Christopher 3d4276f053 The subtarget is cached on the MachineFunction. Access it directly.
llvm-svn: 227173
2015-01-27 07:31:29 +00:00
Eric Christopher e38c8d4aa9 Migrate SeparateConstOffsetFromGEP to use a Function with
getSubtarget.

llvm-svn: 227172
2015-01-27 07:16:37 +00:00
David Majnemer 4c82daea60 LoopRotate: Don't walk the uses of a Constant
LoopRotate wanted to avoid live range interference by looking at the
uses of a Value in the loop latch and seeing if any lied outside of the
loop.  We would wrongly perform this operation on Constants.

This fixes PR22337.

llvm-svn: 227171
2015-01-27 06:21:43 +00:00
Eric Christopher b9f60c17dc Remove unused include.
llvm-svn: 227170
2015-01-27 05:58:44 +00:00
Richard Smith 48372b68fe DR1902: if overload resolution recurses, and the inner overload resolution
selects a deleted function, the outer function is still a candidate even though
the initialization sequence is "otherwise ill-formed".

llvm-svn: 227169
2015-01-27 03:30:40 +00:00
Rui Ueyama 9af09d758a Fix incorrect atom ordinal.
Anonymous atoms created there were getting wrong atom ordinal.
LayoutAfter references take precedence over atom ordinals, so
the bug was not visible, though.

llvm-svn: 227168
2015-01-27 03:05:34 +00:00
Richard Trieu 15ac9363a7 Revert r227148 & r227154 which added a test which infinitely loops.
r227148 added test CommandLineTest.HideUnrelatedOptionsMulti which repeatedly
outputs two following lines:

-tool: CommandLine Error: Option 'test-option-1' registered more than once!
-tool: CommandLine Error: Option 'test-option-2' registered more than once!

r227154 depends on changes from r227148

llvm-svn: 227167
2015-01-27 03:03:47 +00:00
Enrico Granata ca84e982c8 Apply the transformation to the static type as well as the dynamic type. It doesn't make sense to carry along an untransformed static type
llvm-svn: 227166
2015-01-27 02:46:27 +00:00
Chandler Carruth e378a016e8 [PM] Run clang-format over this header to clean up the very few)
divergent formatting issues. This should prevent any format-only diffs
from sneaking into subsequent changes to port TTI to the new pass
manager.

llvm-svn: 227165
2015-01-27 02:20:43 +00:00
Chandler Carruth 406f332174 [PM] Switch a doxygen comment to the standard format. NFC
llvm-svn: 227164
2015-01-27 02:20:41 +00:00
Greg Clayton e507bce2de Allow python command interpreter commands to be interruptable via CTRL+C.
<rdar://problem/17935601>

llvm-svn: 227163
2015-01-27 01:58:22 +00:00
Chandler Carruth d649c0ad56 [PM] Refactor the core logic to run EarlyCSE over a function into an
object that manages a single run of this pass.

This was already essentially how it worked. Within the run function, it
would point members at *stack local* allocations that were only live for
a single run. Instead, it seems much cleaner to have a utility object
whose lifetime is clearly bounded by the run of the pass over the
function and can use member variables in a more direct way.

This also makes it easy to plumb the analyses used into it from the pass
and will make it re-usable with the new pass manager.

No functionality changed here, its just a refactoring.

llvm-svn: 227162
2015-01-27 01:34:14 +00:00
Kuba Brecka aa772feb8e [ASan] Use rpath in tests that produce a shared library
Modifying Darwin/interception-in-shared-lib-test.cc and suppressions-library.cc
to use rpath instead of linking against the full path to the temporary file.
NFC.

llvm-svn: 227161
2015-01-27 01:29:18 +00:00
Eric Christopher 349d5886e5 MachineRegisterInfo can access TII off of the MachineFunction's
subtarget and so doesn't need the TargetMachine or to access via
getSubtargetImpl. Update all callers.

llvm-svn: 227160
2015-01-27 01:15:16 +00:00
Eric Christopher 4e048eeb2a Migrate AtomicExpandPass and DwarfEHPrepare to using a Function-ized getSubtargetImpl.
llvm-svn: 227159
2015-01-27 01:04:42 +00:00
Eric Christopher 7aebb32dd3 Fix unsigned/signed comparison warning.
llvm-svn: 227158
2015-01-27 01:01:39 +00:00
Eric Christopher fccff37b53 Migrate CodeGenPrepare to use the Function based getSubtarget
code.

llvm-svn: 227157
2015-01-27 01:01:38 +00:00
Eric Christopher 2b214e7ad3 Grab the TargetLowering info from the DAG rather than querying for
a subtarget.

llvm-svn: 227156
2015-01-27 01:01:36 +00:00
Eric Christopher 6a524f96de Remove extraneous period.
llvm-svn: 227155
2015-01-27 01:01:34 +00:00
Chris Bieneman fd3dbd9403 One more fix to the new API to fix const-correctness.
llvm-svn: 227154
2015-01-27 00:42:00 +00:00
Greg Clayton 199e7c125e Fix the test to disassemble as if at address zero, not at an invalid address. The default SBAddress constructor sets the offset to 0xffffffffffffffff and the section to NULL.
This was causing problems on clang 602 branches that use MemoryObjects to as the container for opcode bytes instead of a plain array of bytes. So we were asking for 3 bytes to be disassembled at address 0xffffffffffffffff which would cause an unsigned overflow and cause the MemoryObject to refuse to read anymore bytes.

llvm-svn: 227153
2015-01-27 00:22:36 +00:00
Adrian Prantl ad49878697 Replace this testcase with an even shorter one provided by dblaikie.
llvm-svn: 227152
2015-01-27 00:22:17 +00:00
Chad Rosier f9327d6fe9 Commoning of target specific load/store intrinsics in Early CSE.
Phabricator revision: http://reviews.llvm.org/D7121
Patch by Sanjin Sijaric <ssijaric@codeaurora.org>!

llvm-svn: 227149
2015-01-26 22:51:15 +00:00
Chris Bieneman c333e577fe Pete Cooper suggested the new API should use ArrayRef instead of SmallVectorImpl. Also adding a test case.
llvm-svn: 227148
2015-01-26 22:50:47 +00:00
Rui Ueyama 1a63f5b624 Fix local variable names.
llvm-svn: 227147
2015-01-26 22:47:52 +00:00
Philip Reames 219b15e85f Add test cases for PRE w/volatile loads
These tests check that the combination of 227110 (cross block query inst) and 227112 (volatile load semantics) work together properly to allow PRE in cases where a loop contains a volatile access.

llvm-svn: 227146
2015-01-26 22:40:44 +00:00
Simon Pilgrim 0629ba1ad9 [X86][SSE] Float comparisons can sometimes be safely commuted
For ordered, unordered, equal and not-equal tests, packed float and double comparison instructions can be safely commuted without affecting the results. This patch checks the comparison mode of the (v)cmpps + (v)cmppd instructions and commutes the result if it can.

Differential Revision: http://reviews.llvm.org/D7178

llvm-svn: 227145
2015-01-26 22:29:24 +00:00
Rui Ueyama 9d7a15c80d Accept -allow-shlib-undefined in addition to --allow-shlib-undefined.
GNU LD accepts both. CMake seems to use the former than the latter.

llvm-svn: 227144
2015-01-26 22:13:53 +00:00
Zachary Turner 02991af057 Have the UTF conversion wrappers append a null terminator.
This is especially useful for the UTF8 -> UTF16 direction, since
there is no equivalent of llvm::SmallString<> for wide characters.
This means that anyone who wants a null terminated string is forced
to manually push and pop their own null terminator.

Reviewed by: Reid Kleckner.

llvm-svn: 227143
2015-01-26 22:05:50 +00:00
Eric Fiselier 42c8f93cc8 Adopt CMake policy CMP0042. Set MACOSX_RPATH on by default.
llvm-svn: 227142
2015-01-26 22:00:30 +00:00
Simon Pilgrim 9b7c00352d [X86][PCLMUL] Enable commutation for PCLMUL instructions
Patch to allow (v)pclmulqdq to be commuted - swaps the src registers and inverts the immediate (low/high) src mask.

Differential Revision: http://reviews.llvm.org/D7180

llvm-svn: 227141
2015-01-26 22:00:18 +00:00
Chris Bieneman 0104325776 Add new HideUnrelatedOptions API that takes a SmallVectorImpl.
Need a new API for clang-modernize that allows specifying a list of option categories to remain visible. This will allow clang-modernize to move off getRegisteredOptions.

llvm-svn: 227140
2015-01-26 21:57:29 +00:00
Eric Fiselier 8e0dec7c80 Adopt CMake policy CMP0042. Set MACOSX_RPATH on by default.
llvm-svn: 227139
2015-01-26 21:56:45 +00:00
Simon Pilgrim 106abe47d6 Line endings fix. NFC.
llvm-svn: 227138
2015-01-26 21:28:32 +00:00
Matt Arsenault 7d734f44a3 R600: Cleanup or test
Fix broken check lines, use multiple check prefixes,
add an additional test for i1 or.

llvm-svn: 227137
2015-01-26 21:16:10 +00:00
Simon Pilgrim a2f1c40575 Line endings fix. NFC.
llvm-svn: 227136
2015-01-26 21:15:42 +00:00
Pete Cooper f051cbf631 Don't generate llvm.expect intrinsics with -O0.
The backend won't run LowerExpect on -O0.  In a debug LTO build, this results in llvm.expect intrinsics being in the LTO IR which doesn't know how to optimize them.

Thanks to Chandler for the suggestion and review.

Differential revision: http://reviews.llvm.org/D7183

llvm-svn: 227135
2015-01-26 20:51:58 +00:00
Greg Fitzgerald 0dc86722f5 Fix shared library build
* Removed cyclic dependency between lldPECOFF and lldDriver
* Added missing dependencies in unit tests

Differential Revision: http://reviews.llvm.org/D7185

llvm-svn: 227134
2015-01-26 20:46:47 +00:00