Kai Nacke [Mon, 8 Jul 2013 04:45:05 +0000 (04:45 +0000)]
Revert: Fix alignment of unwind data.
llvm-svn: 185790
Craig Topper [Mon, 8 Jul 2013 04:44:01 +0000 (04:44 +0000)]
Introduce a typedef for the type of NewlyDeducedPacks to avoid repeating the small size of the inner SmallVector.
llvm-svn: 185789
Kai Nacke [Mon, 8 Jul 2013 04:43:23 +0000 (04:43 +0000)]
Revert: Emit personality function and Dwarf EH data for Win64 SEH.
llvm-svn: 185788
Craig Topper [Mon, 8 Jul 2013 04:24:47 +0000 (04:24 +0000)]
Remove 'else' after 'return'
llvm-svn: 185787
Craig Topper [Mon, 8 Jul 2013 04:16:49 +0000 (04:16 +0000)]
Function argument formatting fixes. No functional change.
llvm-svn: 185786
Craig Topper [Mon, 8 Jul 2013 04:13:06 +0000 (04:13 +0000)]
Function argument formatting fixes.
llvm-svn: 185785
Craig Topper [Mon, 8 Jul 2013 03:55:09 +0000 (03:55 +0000)]
Use SmallVectorImpl::reverse_iterator instead of SmallVector to avoid specifying the vector size.
llvm-svn: 185784
Hal Finkel [Mon, 8 Jul 2013 03:24:07 +0000 (03:24 +0000)]
Add the nearbyint -> FNEARBYINT mapping to BasicTargetTransformInfo
This fixes an oversight that Intrinsic::nearbyint was not being mapped to
ISD::FNEARBYINT (thus fixing the over-optimistic cost we were assigning to
nearbyint calls for some targets).
llvm-svn: 185783
Michael Gottesman [Mon, 8 Jul 2013 02:13:47 +0000 (02:13 +0000)]
[objc-arc] Committed test for r185770 as per dblaikie's suggestion.
llvm-svn: 185782
Nico Rieck [Mon, 8 Jul 2013 01:30:57 +0000 (01:30 +0000)]
Revert "Reuse %rax after calling __chkstk on win64"
This reverts commit
01f8d579f7672872324208ac5bc4ac311e81b22e.
llvm-svn: 185781
Stephen Lin [Mon, 8 Jul 2013 00:37:03 +0000 (00:37 +0000)]
Remove trailing whitespace from SelectionDAG/*.cpp
llvm-svn: 185780
David Majnemer [Sun, 7 Jul 2013 23:49:50 +0000 (23:49 +0000)]
Sema: Do not merge new decls with invalid, old decls
Sema::MergeFunctionDecl attempts merging two decls even if the old decl
is invalid. This can lead to interesting circumstances where we
successfully merge the decls but the result makes no sense.
Take the following for example:
template <typename T>
int main(void);
int main(void);
Sema will not consider these to be overloads of the same name because
main can't be overloaded, which means that this must be a redeclaration.
In this case the templated decl is compatible with the non-templated
decl allowing the Sema::CheckFunctionDeclaration machinery to move on
and do bizarre things like setting the previous decl of a non-templated
decl to a templated decl!
The way I see it, we should just bail from MergeFunctionDecl if the old
decl is invalid.
This fixes PR16531.
llvm-svn: 185779
Nico Rieck [Sun, 7 Jul 2013 16:48:39 +0000 (16:48 +0000)]
Reuse %rax after calling __chkstk on win64
llvm-svn: 185778
Nadav Rotem [Sun, 7 Jul 2013 14:57:18 +0000 (14:57 +0000)]
Clear the builder insert point between tree-vectorization phases.
llvm-svn: 185777
Nick Lewycky [Sun, 7 Jul 2013 10:15:16 +0000 (10:15 +0000)]
Eliminate trivial redundant loads across nocapture+readonly calls to uncaptured
pointer arguments.
llvm-svn: 185776
Nick Lewycky [Sun, 7 Jul 2013 08:29:51 +0000 (08:29 +0000)]
Add missing per-argument doesNotAccessMemory accessors. No functionality change
since it has no callers today.
llvm-svn: 185775
Nadav Rotem [Sun, 7 Jul 2013 06:57:07 +0000 (06:57 +0000)]
SLPVectorizer: Implement DCE as part of vectorization.
This is a complete re-write if the bottom-up vectorization class.
Before this commit we scanned the instruction tree 3 times. First in search of merge points for the trees. Second, for estimating the cost. And finally for vectorization.
There was a lot of code duplication and adding the DCE exposed bugs. The new design is simpler and DCE was a part of the design.
In this implementation we build the tree once. After that we estimate the cost by scanning the different entries in the constructed tree (in any order). The vectorization phase also works on the built tree.
llvm-svn: 185774
Enea Zaffanella [Sun, 7 Jul 2013 06:41:54 +0000 (06:41 +0000)]
Fixed source range for functional cast and unresolved construct expr nodes.
Added testcases.
llvm-svn: 185773
Richard Smith [Sun, 7 Jul 2013 06:15:42 +0000 (06:15 +0000)]
Rename test to match C++1y paragraph number per N3690, and add additional test
case inspired by a stackoverflow question.
llvm-svn: 185772
James Dennett [Sun, 7 Jul 2013 05:19:50 +0000 (05:19 +0000)]
Documentation cleanup for include/clang/AST/DeclCXX.h, no substantive changes.
* Fix up \brief documentation;
* Update C++0x references to C++11;
* Doxygen formatting: bulleted lists start with a single hyphen, not two;
* Fix a typo, "assosiate" -> "associate".
llvm-svn: 185771
Michael Gottesman [Sun, 7 Jul 2013 04:18:03 +0000 (04:18 +0000)]
[objc-arc] Remove the alias analysis part of r185764.
Upon further reflection, the alias analysis part of r185764 is not a safe
change.
llvm-svn: 185770
Michael Gottesman [Sun, 7 Jul 2013 01:52:55 +0000 (01:52 +0000)]
[objc-arc] Teach the ARC optimizer that objc_sync_enter/objc_sync_exit do not modify the ref count of an objc object and additionally are inert for modref purposes.
llvm-svn: 185769
Stephen Lin [Sat, 6 Jul 2013 21:44:25 +0000 (21:44 +0000)]
SelectionDAGBuilder: style fixes (add space between end parentheses and open brace)
llvm-svn: 185768
Joey Gouly [Sat, 6 Jul 2013 20:50:18 +0000 (20:50 +0000)]
Add MC support for the v8fp instructions: vmaxnm and vminnm.
llvm-svn: 185767
Benjamin Kramer [Sat, 6 Jul 2013 20:01:46 +0000 (20:01 +0000)]
COFFDumper: Print uint64_t with the right format string.
I wish we could typecheck llvm::format.
llvm-svn: 185766
Enea Zaffanella [Sat, 6 Jul 2013 18:54:58 +0000 (18:54 +0000)]
Fixed source location info for UnaryTransformTypeLoc nodes.
llvm-svn: 185765
Michael Gottesman [Sat, 6 Jul 2013 18:43:05 +0000 (18:43 +0000)]
[objc-arc] When we initialize ARCRuntimeEntryPoints, make sure we reset all references to entrypoint declarations as well.
llvm-svn: 185764
Nico Rieck [Sat, 6 Jul 2013 18:08:19 +0000 (18:08 +0000)]
Proper va_arg/va_copy lowering on win64
llvm-svn: 185763
Fariborz Jahanian [Sat, 6 Jul 2013 18:04:13 +0000 (18:04 +0000)]
Objective-C: Warn when fast enumeration variable isn't used.
// rdar://
14182680.
llvm-svn: 185762
Kai Nacke [Sat, 6 Jul 2013 17:17:31 +0000 (17:17 +0000)]
Emit personality function and Dwarf EH data for Win64 SEH.
Obviously the personality function should be emitted as language handler
instead of the hard coded _GCC_specific_handler. The language specific
data must be placed after the unwind information therefore it must not
be emitted into a separate section.
Reviewed by Charles Davis and Nico Rieck.
llvm-svn: 185761
Kai Nacke [Sat, 6 Jul 2013 17:16:50 +0000 (17:16 +0000)]
Fix alignment of unwind data.
For alignment purposes, the instruction array will always have an even
number of entries, with the final entry potentially unused (in which
case the array will be one longer than indicated by the count of unwind
codes field).
Reviewed by Charles Davis and Nico Rieck.
llvm-svn: 185760
Kai Nacke [Sat, 6 Jul 2013 17:16:12 +0000 (17:16 +0000)]
Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEH
data structures.
The Win64 EH data structures must be of type IMAGE_REL_AMD64_ADDR32NB
instead of IMAGE_REL_AMD64_ADDR32. This is easiely achieved by adding
the VK_COFF_IMGREL32 modifier to the symbol reference.
Change also references to start and end of the SEH range of a function
as offsets to start of the function.
Reviewed by Charles Davis and Nico Rieck.
llvm-svn: 185759
Kai Nacke [Sat, 6 Jul 2013 17:15:36 +0000 (17:15 +0000)]
Fix wrong code offset for unwind code SET_FPREG.
The code offset for unwind code SET_FPREG is wrong because it is set
to constant 0. The fix is to do the same as for the other unwind
codes: emit a label and later the absolute difference between the
label and the begin of the prologue.
Also enables the failing test case MC/COFF/seh.s
Reviewed by Charles Davis and Nico Rieck.
llvm-svn: 185758
Benjamin Kramer [Sat, 6 Jul 2013 15:10:13 +0000 (15:10 +0000)]
Reassociate: Remove unnecessary default operator=.
llvm-svn: 185757
Howard Hinnant [Sat, 6 Jul 2013 14:41:36 +0000 (14:41 +0000)]
Silence -Wint-to-void-pointer-cast warning in test.
llvm-svn: 185756
Benjamin Kramer [Sat, 6 Jul 2013 14:05:09 +0000 (14:05 +0000)]
DAGCombiner: Don't drop extension behavior when shrinking a load when unsafe.
ReduceLoadWidth unconditionally drops extensions from loads. Limit it to the
case when all of the bits the extension would otherwise produce are dropped by
the shrink. It would be possible to shrink the load in more cases by merging
the extensions, but this isn't trivial and a very rare case. I left a TODO for
that case.
Fixes PR16551.
llvm-svn: 185755
Tim Northover [Sat, 6 Jul 2013 12:58:45 +0000 (12:58 +0000)]
Stop putting operations after a tail call.
This prevents the emission of DAG-generated vreg definitions after a
tail call be dropping them entirely (on the grounds that nothing could
use them anyway, and they interfere with O0 CodeGen).
llvm-svn: 185754
Nico Rieck [Sat, 6 Jul 2013 12:13:10 +0000 (12:13 +0000)]
MC: Implement COFF .linkonce directive
llvm-svn: 185753
Sylvestre Ledru [Sat, 6 Jul 2013 08:00:09 +0000 (08:00 +0000)]
Remove some useless declarations (found by scan-build)
llvm-svn: 185752
Michael Gottesman [Sat, 6 Jul 2013 02:39:51 +0000 (02:39 +0000)]
[llvm-ar] Added llvm_unreachable to quiet -Wreturn-type warnings.
llvm-svn: 185751
David Majnemer [Sat, 6 Jul 2013 02:24:59 +0000 (02:24 +0000)]
isKnownToBeAPowerOfTwo: Fix a typo in a comment
llvm-svn: 185748
Michael Gottesman [Sat, 6 Jul 2013 02:18:56 +0000 (02:18 +0000)]
[objc-arc] Performed some small cleanups in ARCRuntimeEntryPoints and added an llvm_unreachable after the switch to quiet -Wreturn_type errors.
llvm-svn: 185746
David Majnemer [Sat, 6 Jul 2013 02:13:46 +0000 (02:13 +0000)]
Sema: Fix a crash when main is redeclared as a function-template.
This boils down to us sending invalid function decls to
CheckFunctionDeclaration becauswe we did not consider that CheckMain
could cause the decl to be invalid. Instead, interogate the new decl's
main-validity and *then* send it over to get CheckFunctionDeclaration'd
if it was still valid after calling CheckMain.
llvm-svn: 185745
Michael Gottesman [Sat, 6 Jul 2013 01:57:32 +0000 (01:57 +0000)]
[objc-arc] Renamed Module => TheModule in ARCRuntimeEntryPoints. Also did some small cleanups.
This fixes an issue that came up due to -fpermissive on the bots.
llvm-svn: 185744
Michael Gottesman [Sat, 6 Jul 2013 01:41:35 +0000 (01:41 +0000)]
Removed trailing whitespace.
llvm-svn: 185743
Michael Gottesman [Sat, 6 Jul 2013 01:39:26 +0000 (01:39 +0000)]
[objc-arc] Updated ObjCARCContract to use ARCRuntimeEntryPoints.
llvm-svn: 185742
Michael Gottesman [Sat, 6 Jul 2013 01:39:23 +0000 (01:39 +0000)]
[objc-arc] Updated ObjCARCOpts to use ARCRuntimeEntryPoints.
llvm-svn: 185741
Michael Gottesman [Sat, 6 Jul 2013 01:39:18 +0000 (01:39 +0000)]
[objc-arc] Refactor runtime entrypoint declaration entrypoint creation.
This is the first patch in a series of 3 patches which clean up how we create
runtime function declarations in the ARC optimizer when they do not exist
already in the IR.
Currently we have a bunch of duplicated code in ObjCARCOpts, ObjCARCContract
that does this. This patch refactors that code into a separate class called
ARCRuntimeEntryPoints which lazily creates the declarations for said
entrypoints.
The next two patches will consist of the work of refactoring
ObjCARCContract/ObjCARCOpts to use this new code.
llvm-svn: 185740
Nick Lewycky [Sat, 6 Jul 2013 01:04:47 +0000 (01:04 +0000)]
Fix language.
llvm-svn: 185739
Nick Lewycky [Sat, 6 Jul 2013 00:59:28 +0000 (00:59 +0000)]
Fix annotation of unlink. Should fix builder.
llvm-svn: 185738
David Majnemer [Sat, 6 Jul 2013 00:54:07 +0000 (00:54 +0000)]
InstCombine: typo in or_icmp_eq_B_0_icmp_ult_A_B test
llvm-svn: 185737
Nick Lewycky [Sat, 6 Jul 2013 00:30:27 +0000 (00:30 +0000)]
Update test for change in r185735.
llvm-svn: 185736
Nick Lewycky [Sat, 6 Jul 2013 00:29:58 +0000 (00:29 +0000)]
Extend 'readonly' and 'readnone' to work on function arguments as well as
functions. Make the function attributes pass add it to known library functions
and when it can deduce it.
llvm-svn: 185735
Fariborz Jahanian [Fri, 5 Jul 2013 23:50:55 +0000 (23:50 +0000)]
Remove referece type onproperty of abstract
class type. // rdar://
14261999
llvm-svn: 185734
Jakob Stoklund Olesen [Fri, 5 Jul 2013 23:48:07 +0000 (23:48 +0000)]
Use modern API to avoid exposing LiveInterval internals.
No functional change intended.
llvm-svn: 185733
Fariborz Jahanian [Fri, 5 Jul 2013 23:20:55 +0000 (23:20 +0000)]
[comment parsing]: Removes an unsafe API whose
use can cause crash. No test is available. It is uncovered
by code browsing. // rdar://
14348205
llvm-svn: 185732
Jakob Stoklund Olesen [Fri, 5 Jul 2013 23:04:55 +0000 (23:04 +0000)]
Remove dead function.
llvm-svn: 185731
Rafael Espindola [Fri, 5 Jul 2013 22:32:33 +0000 (22:32 +0000)]
Fix windows build.
llvm-svn: 185730
Michael Gottesman [Fri, 5 Jul 2013 22:24:06 +0000 (22:24 +0000)]
[TRE] Combined another test into basic.ll
llvm-svn: 185729
Rafael Espindola [Fri, 5 Jul 2013 21:19:35 +0000 (21:19 +0000)]
Remove unique_file now that it is unused.
llvm-svn: 185728
Rafael Espindola [Fri, 5 Jul 2013 21:13:58 +0000 (21:13 +0000)]
Use llvm::sys::fs::createUniqueFile.
Include a test that clang now produces output files with permissions matching
the umask.
llvm-svn: 185727
Rafael Espindola [Fri, 5 Jul 2013 21:01:08 +0000 (21:01 +0000)]
Add a createUniqueFile function and switch llvm's users of unique_file.
This function is complementary to createTemporaryFile. It handles the case were
the unique file is *not* temporary: we will rename it in the end. Since we
will rename it, the file has to be in the same filesystem as the final
destination and we don't prepend the system temporary directory.
This has a small semantic difference from unique_file: the default mode is 0666.
This matches the behavior of most unix tools. For example, with this change
lld now produces files with the same permissions as ld. I will add a test
of this change when I port clang over to createUniqueFile (next commit).
llvm-svn: 185726
Argyrios Kyrtzidis [Fri, 5 Jul 2013 20:51:44 +0000 (20:51 +0000)]
[libclang] Add the new function to libclang.exports
llvm-svn: 185725
Fariborz Jahanian [Fri, 5 Jul 2013 20:46:03 +0000 (20:46 +0000)]
[objc migrator]: More knobs to do migration to
use of objc's properties.
llvm-svn: 185724
Michael Gottesman [Fri, 5 Jul 2013 20:45:13 +0000 (20:45 +0000)]
[TRE] Merged several tests into the the test basic.ll.
llvm-svn: 185723
Argyrios Kyrtzidis [Fri, 5 Jul 2013 20:44:37 +0000 (20:44 +0000)]
[libclang] Introduce clang_Cursor_isObjCOptional, which returns whether the declaration was affected by "@optional"
rdar://
14348525.
llvm-svn: 185722
Eli Friedman [Fri, 5 Jul 2013 20:27:40 +0000 (20:27 +0000)]
Don't use mangleCXXRTTIName in TBAA for C code.
This changes the TBAA code so it doesn't use mangleCXXRTTIName in C,
because it doesn't really make sense there. Also, as sort of a
defense-in-depth change, fix the mangler so it handles C RecordDecls
correctly.
No tests because I don't know the TBAA code well enough to write a test,
and I don't know how else to trigger mangling a local struct in C.
Fixes a crash with r185450 reported by Joerg Sonnenberger.
llvm-svn: 185721
Sebastian Pop [Fri, 5 Jul 2013 20:24:47 +0000 (20:24 +0000)]
scop detection: remove an iteration over all uses
reenabled reverted patch after checking that it passes without regressions on
the nightly test-suite. Added testcase from Tobi.
llvm-svn: 185720
Rafael Espindola [Fri, 5 Jul 2013 20:14:52 +0000 (20:14 +0000)]
Use sys::fs::createTemporaryFile.
llvm-svn: 185719
Rafael Espindola [Fri, 5 Jul 2013 20:01:03 +0000 (20:01 +0000)]
Use llvm::sys::fs::createTemporaryFile.
llvm-svn: 185718
Rafael Espindola [Fri, 5 Jul 2013 20:00:06 +0000 (20:00 +0000)]
Use llvm::sys::fs::createTemporaryFile.
llvm-svn: 185717
Rafael Espindola [Fri, 5 Jul 2013 19:56:49 +0000 (19:56 +0000)]
Add a higher level createTemporaryFile function.
This function is inspired by clang's Driver::GetTemporaryPath. It hides the
pattern used for uniquing and requires simple file names that are always
placed in the system temporary directory.
llvm-svn: 185716
Craig Topper [Fri, 5 Jul 2013 19:34:19 +0000 (19:34 +0000)]
Use SmallVectorImpl& for function arguments instead of SmallVector.
llvm-svn: 185715
Arnold Schwaighofer [Fri, 5 Jul 2013 18:57:49 +0000 (18:57 +0000)]
ARM: Add a pack pattern for matching arithmetic shift right
llvm-svn: 185714
Eli Friedman [Fri, 5 Jul 2013 18:41:30 +0000 (18:41 +0000)]
Fix regression from r185450.
As it turns out, the NoFunction bit for local class mangling needed to be
propagated into more places. r185450 turned what used to be an incorrect
mangling into an assertion.
llvm-svn: 185713
Arnold Schwaighofer [Fri, 5 Jul 2013 18:28:39 +0000 (18:28 +0000)]
ARM: Fix incorrect pack pattern
A "pkhtb x, x, y asr #num" uses the lower 16 bits of "y asr #num" and packs them
in the bottom half of "x". An arithmetic and logic shift are only equivalent in
this context if the shift amount is 16. We would be shifting in ones into the
bottom 16bits instead of zeros if "y" is negative.
radar://
14338767
llvm-svn: 185712
Howard Hinnant [Fri, 5 Jul 2013 18:06:00 +0000 (18:06 +0000)]
Remove implicit conversion from __value_type to value_type in [unordered_][multi]map. This fixes llvm.org/bugs/show_bug.cgi?id=16549
llvm-svn: 185711
Fariborz Jahanian [Fri, 5 Jul 2013 17:18:11 +0000 (17:18 +0000)]
Objective-C: diagnose when synthesizing an ivar of
abstract class type. // rdar://
14261999
llvm-svn: 185710
Sylvestre Ledru [Fri, 5 Jul 2013 15:58:12 +0000 (15:58 +0000)]
Remove a useless declarations (found by scan-build)
llvm-svn: 185709
Benjamin Kramer [Fri, 5 Jul 2013 15:51:00 +0000 (15:51 +0000)]
Add a test case for r185707/PR16547.
llvm-svn: 185708
Rafael Espindola [Fri, 5 Jul 2013 15:05:40 +0000 (15:05 +0000)]
Fix PR16547.
We should not be asking unique_file to prepend the system temporary directory
when creating the html report. Unfortunately I don't think we can test this
with the current infrastructure since unique_file ignores MakeAbsolute if the
directory is already absolute and the paths provided by lit are.
I will take a quick look at making this api a bit less error prone.
llvm-svn: 185707
Evgeniy Stepanov [Fri, 5 Jul 2013 15:04:56 +0000 (15:04 +0000)]
[sanitizer] Fix mac build.
llvm-svn: 185706
Richard Sandiford [Fri, 5 Jul 2013 14:38:48 +0000 (14:38 +0000)]
[SystemZ] Remove no-op MVCs
The stack coloring pass has code to delete stores and loads that become
trivially dead after coloring. Extend it to cope with single instructions
that copy from one frame index to another.
The testcase happens to show an example of this kicking in at the moment.
It did occur in Real Code too though.
llvm-svn: 185705
Richard Sandiford [Fri, 5 Jul 2013 14:31:24 +0000 (14:31 +0000)]
[SystemZ] Remove redundant frame MMOs
This fixes foldMemoryOperandImpl() so that it doesn't create duplicated
frame MMOs. I hadn't realized when writing r185434 that it was the caller's
responsibility to add these.
No behavioural change intended.
llvm-svn: 185704
Richard Sandiford [Fri, 5 Jul 2013 14:24:47 +0000 (14:24 +0000)]
Fix double renaming bug in stack coloring pass
The stack coloring pass renumbered frame indexes with a loop of the form:
for each frame index FI
for each instruction I that uses FI
for each use of FI in I
rename FI to FI'
This caused problems if an instruction used two frame indexes F0 and F1
and if F0 was renamed to F1 and F1 to F2. The first time we visited the
instruction we changed F0 to F1, then we changed both F1s to F2.
In other words, the problem was that SSRefs recorded which instructions
used an FI, but not which MachineOperands and MachineMemOperands within
that instruction used it.
This is easily fixed for MachineOperands by walking the instructions
once and processing each operand in turn. There's already a loop to
do that for dead store elimination, so it seemed more efficient to
fuse the two at the block level.
MachineMemOperands are more tricky because they can be shared between
instructions. The patch handles them by making SSRefs an array of
MachineMemOperands rather than an array of MachineInstrs. We might end
up processing the same MachineMemOperand twice, but that's OK because
we always know from the SSRefs index what the original frame index was.
llvm-svn: 185703
Rafael Espindola [Fri, 5 Jul 2013 14:15:24 +0000 (14:15 +0000)]
We don't need to check for windows' error codes in here.
The operator== calls equivalent which calls default_error_condition which
handles windows to posix conversion.
llvm-svn: 185702
Richard Sandiford [Fri, 5 Jul 2013 14:02:01 +0000 (14:02 +0000)]
[SystemZ] Enable the use of MVC for frame-to-frame spills
...now that the problem that prompted the restriction has been fixed.
The original spill-02.py was a compromise because at the time I couldn't
find an example that actually failed without the two scavenging slots.
The version included here did.
llvm-svn: 185701
Ulrich Weigand [Fri, 5 Jul 2013 13:49:46 +0000 (13:49 +0000)]
[PowerPC] Add some special @got@tprel fixup cases
When a target@got@tprel or target@got@tprel@l symbol variant is used in
a fixup_ppc_half16 (*not* fixup_ppc_half16ds) context, we currently fail,
since the corresponding R_PPC64_GOT_TPREL16 / R_PPC64_GOT_TPREL16_LO
relocation types do not exist.
However, since such symbol variants resolve to GOT offsets which are
always 4-aligned, we can simply instead use the _DS variants of the
relocation types, which *do* exist.
The same applies for the @got@dtprel variants.
llvm-svn: 185700
Daniel Jasper [Fri, 5 Jul 2013 13:30:40 +0000 (13:30 +0000)]
Fix formatting for allocation of new pointer variables.
Before:
T **t = new T * ;
T **q = new T * ();
After:
T **t = new T *;
T **q = new T *();
llvm-svn: 185699
Richard Sandiford [Fri, 5 Jul 2013 13:11:52 +0000 (13:11 +0000)]
[SystemZ] Allocate a second register scavenging slot
This is another prerequisite for frame-to-frame MVC copies.
I'll commit the patch that makes use of the slot separately.
The downside of trying to test many corner cases with each of the
available addressing modes is that a fair few tests need to account
for the new frame layout. I do still think it's useful to have all
these tests though, since it's something that wouldn't get much coverage
otherwise.
llvm-svn: 185698
Rafael Espindola [Fri, 5 Jul 2013 13:03:07 +0000 (13:03 +0000)]
Don't create an archive if, for example, we are asked to print the index.
llvm-svn: 185697
Richard Sandiford [Fri, 5 Jul 2013 12:55:00 +0000 (12:55 +0000)]
[SystemZ] Clean up register scavenging code
SystemZ wants normal register scavenging slots, as close to the stack or
frame pointer as possible. The only reason it was using custom code was
because PrologEpilogInserter assumed an x86-like layout, where the frame
pointer is at the opposite end of the frame from the stack pointer.
This meant that when frame pointer elimination was disabled,
the slots ended up being as close as possible to the incoming
stack pointer, which is the opposite of what we want on SystemZ.
This patch adds a new knob to say which layout is used and converts
SystemZ to use target-independent scavenging slots. It's one of the pieces
needed to support frame-to-frame MVCs, where two slots might be required.
The ABI requires us to allocate 160 bytes for calls, so one approach
would be to use that area as temporary spill space instead. It would need
some surgery to make sure that the slot isn't live across a call though.
I stuck to the "isFPCloseToIncomingSP - ..." style comment on the
"do what the surrounding code does" principle. The FP case is already
covered by several Systemz/frame-* tests, which fail without the
PrologueEpilogueInserter change, so no new ones are needed.
No behavioural change intended.
llvm-svn: 185696
Rafael Espindola [Fri, 5 Jul 2013 12:44:49 +0000 (12:44 +0000)]
Use simpler version of exists.
llvm-svn: 185695
Ulrich Weigand [Fri, 5 Jul 2013 12:33:03 +0000 (12:33 +0000)]
[PowerPC] Make test case buildable with GNU as
The ppc64-fixups.s test currently fails to build with GNU as, since it
does not support plain symbols as arguments to li/lis. Rewrite the test
for R_PPC64_ADDR16 and R_PPC64_REL16 to use lwz instead.
Allowing the test case to be built with both LLVM and GNU as makes it
easier to spot unwanted difference in the output.
llvm-svn: 185694
Evgeniy Stepanov [Fri, 5 Jul 2013 12:31:07 +0000 (12:31 +0000)]
[msan] Intercept pthread_key_create.
llvm-svn: 185693
Ulrich Weigand [Fri, 5 Jul 2013 12:22:36 +0000 (12:22 +0000)]
[PowerPC] Support @tls in the asm parser
This adds support for the last missing construct to parse TLS-related
assembler code:
add 3, 4, symbol@tls
The ADD8TLS currently hard-codes the @tls into the assembler string.
This cannot be handled by the asm parser, since @tls is parsed as
a symbol variant. This patch changes ADD8TLS to have the @tls suffix
printed as symbol variant on output too, which allows us to remove
the isCodeGenOnly marker from ADD8TLS. This in turn means that we
can add a AsmOperand to accept @tls marked symbols on input.
As a side effect, this means that the fixup_ppc_tlsreg fixup type
is no longer necessary and can be merged into fixup_ppc_nofixup.
llvm-svn: 185692
Rafael Espindola [Fri, 5 Jul 2013 12:12:43 +0000 (12:12 +0000)]
Remove NoOperation.
parseCommandLine prints and error and exists if no operation is specified, so
it never returns NoOperation.
llvm-svn: 185691
Rui Ueyama [Fri, 5 Jul 2013 10:41:44 +0000 (10:41 +0000)]
[PECOFF] Use yaml2obj to avoid checking in binary files.
llvm-svn: 185690
Benjamin Kramer [Fri, 5 Jul 2013 10:20:57 +0000 (10:20 +0000)]
Simplify code. No functionality change.
llvm-svn: 185689
Joey Gouly [Fri, 5 Jul 2013 10:19:40 +0000 (10:19 +0000)]
PR16490: fix a crash in ARMDAGToDAGISel::SelectInlineAsm.
In the SelectionDAG immediate operands to inline asm are constructed as
two separate operands. The first is a constant of value InlineAsm::Kind_Imm
and the second is a constant with the value of the immediate.
In ARMDAGToDAGISel::SelectInlineAsm, if we reach an operand of Kind_Imm we
should skip over the next operand too.
llvm-svn: 185688