Commit Graph

188452 Commits

Author SHA1 Message Date
Simon Atanasyan d83248e60c [mips] Removing __SIZEOF_INT128__ macro for MIPS64
This is a temporary workaround while MIPS64 has not yet fully supported
128-bit integers. But declaration of int128 type is necessary even though
`__SIZEOF_INT128__` is undefined because c++ standard header files like
`limits` throw error message if `__int128` is not available.

Patch by Sagar Thakur.

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

llvm-svn: 223927
2014-12-10 15:44:07 +00:00
Aaron Ballman e5a2a0c9a8 Silencing a -Wsequence-point warning, and the resulting undefined behavior. NFC.
llvm-svn: 223926
2014-12-10 14:14:54 +00:00
Evgeniy Stepanov e14d29b1de [sanitizer] Disable compile-time checks for __kernel_old_uid_t size on aarch64.
Should fix PR21476.

llvm-svn: 223925
2014-12-10 11:44:09 +00:00
David Majnemer 7b86b77248 ConstantFold: div undef, 0 should fold to undef, not zero
Dividing by zero yields an undefined value.

llvm-svn: 223924
2014-12-10 09:14:55 +00:00
David Majnemer ae707582c0 InstSimplify: [al]shr exact undef, %X -> undef
Exact shifts always keep the non-zero bits of their input.  This means
it keeps it's undef bits.

llvm-svn: 223923
2014-12-10 09:14:52 +00:00
Michael Kuperstein 0104ff6529 [X86] Make a code path in EltsFromConsecutiveLoads work only on vectors it expects
EltsFromConsecutiveLoads was apparently only ever called for 128-bit vectors, and assumed this implicitly. r223518 started calling it for AVX-sized vectors, causing the code path that had this assumption to crash.
This adds a check to make this path fire only for 128-bit vectors.

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

llvm-svn: 223922
2014-12-10 08:46:12 +00:00
NAKAMURA Takumi 1969fd52bb clang/test/Modules/modular_maps.cpp REQUIRES shell. chdir is unsupported on Lit internal runner.
llvm-svn: 223921
2014-12-10 08:20:32 +00:00
Rui Ueyama 72bdc270cc Remove unreachable return statement.
llvm-svn: 223920
2014-12-10 08:12:06 +00:00
David Majnemer 71dc8fb867 InstSimplify: div %X, 0 -> undef
We already optimized rem %X, 0 to undef, we should do the same for div.

llvm-svn: 223919
2014-12-10 07:52:18 +00:00
Craig Topper 48a8e641e2 Use unique_ptr instead of DeleteContainerSeconds.
llvm-svn: 223918
2014-12-10 06:18:57 +00:00
Simon Atanasyan 04da06ccee [ELF] Make -init/-fini options compatible with the gnu linker
The LLD linker searches initializer and finalizer function names
and emits DT_INIT/DT_FINI dynamic table tags to point to these symbols.
The -init/-fini command line options override initializer ("_init") and
finalizer ("_fini") function names used by default.

Now the -init/-fini options do not affect .init_array/.fini_array
sections. The corresponding code has been removed.

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

llvm-svn: 223917
2014-12-10 05:38:46 +00:00
Duncan P. N. Exon Smith f3079d2762 ClangFunction: Fix destruction order of parser and execution unit
Fix PR21802 by correcting the destruction order of
`ClangExpressionParser` and `IRExecutionUnit` in `ClangFunction`.  The
former has hooks into the latter -- i.e., `clang::CGDebugInfo` points at
the `LLVMContext` -- so it needs to be torn down first.

This was exposed by r223802 in LLVM, which started doing work in the
`CGDebugInfo` teardown.

llvm-svn: 223916
2014-12-10 04:59:18 +00:00
Eric Fiselier 89c019ecd2 [LIT] Add support for `UNSUPPORTED` tag to `TestRunner.parseIntegratedTestScript`
Summary:
This patch gives me just enough to leverage the existing functionality in `TestRunner` for use in `libc++` and `libc++abi` .

It does the following:
* Adds the `UNSUPPORTED` tag to `TestRunner.parseIntegratedTestScript`.
* Allows `parseIntegratedTestScript` to return an empty script if a script is not required by the caller.



Reviewers: ddunbar, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits, llvm-commits

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

llvm-svn: 223915
2014-12-10 03:42:09 +00:00
Richard Smith 2cf124a9f3 Update to match clang r223913.
llvm-svn: 223914
2014-12-10 03:10:06 +00:00
Richard Smith 9acb99e342 Reinstate r223753, reverted in r223759 due to breakage of clang-tools-extra.
Original commit message:

[modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1.

For files named by -fmodule-map-file=, and files found by 'extern module'
directives, this flag specifies that we should resolve filenames relative to
the current working directory rather than relative to the directory in which
the module map file resides. This is aimed at fixing path handling, in
particular for relative -I paths, when building modules that represent
components of the current project (rather than libraries installed on the
current system, which the current project has as dependencies, where we'd
typically expect the module map files to be looked up implicitly).

llvm-svn: 223913
2014-12-10 03:09:48 +00:00
Sean Callanan 49475327ff Fixed the AST importer ot use redeclaration contexts properly.
To ensure that we don't import duplicates, the ASTImporter often
checks the DeclContext for a Decl before importing it to see if
a Decl with the same name is already present.  

This is problematic if the Decl is inside a transparent context
like an extern "C" block.  Lookup isn't allowed on such contexts,
and in fact they assert() if you do that.  So instead we look at
the redeclaration context -- the containing context that can be
used safely for these kinds of checks -- instead.

llvm-svn: 223912
2014-12-10 03:09:41 +00:00
David Majnemer 612f31284e DataLayout: Provide nicer diagnostics for malformed strings
llvm-svn: 223911
2014-12-10 02:36:41 +00:00
Saleem Abdulrasool 1fe0c18914 builtins: cleanup constant data section selection
Each of the object formats use a different directive for selecting the constant
section.  Use a macro to avoid the duplication across a number of files.  Also
correct a small macro mismatch on the Windows case (HIDDEN_DIRECTIVE -> HIDDEN).

Patch by Vadim Chugunov!

llvm-svn: 223910
2014-12-10 02:36:22 +00:00
Alexey Samsonov 20962292e8 [DD] Don't store the second copy of CommonFlags inside DDFlags.
llvm-svn: 223909
2014-12-10 02:30:04 +00:00
Alexey Samsonov c2485cab33 [CMake] Make sure dd is built as a part of compiler-rt.
Remove unused variables and definitions in CMake files
for TSan and DD (deadlock detector).

llvm-svn: 223908
2014-12-10 02:14:15 +00:00
David Majnemer 6f3be2e155 AsmParser: Don't allow null bytes in BB labels
Since Value objects can't have null bytes in their name, we shouldn't
allow them in the labels of basic blocks.

llvm-svn: 223907
2014-12-10 02:10:35 +00:00
Enrico Granata ff0f23dd41 Remove the last vestige of the world before data formatters :-)
Function pointers had a summary generated for them bypassing formatters, directly as part of the ValueObject subsystem

This patch transitions that code into a hardcoded summary

llvm-svn: 223906
2014-12-10 02:00:45 +00:00
Oleksiy Vyalov b9321bd774 Skip TestExprPathSynthetic test on FreeBSD, Linux & Windows.
llvm-svn: 223905
2014-12-10 01:48:17 +00:00
Duncan P. N. Exon Smith f14b1df55b IR: Move call to dropAllReferences() to MDNode subclasses
Don't call `dropAllReferences()` from `MDNode::~MDNode()`, call it
directly from `~MDNodeFwdDecl()` and `~GenericMDNode()`.

llvm-svn: 223904
2014-12-10 01:45:04 +00:00
David Majnemer 2dc1b0f514 DataLayout: Be more verbose when diagnosing problems in pointer specs
llvm-svn: 223903
2014-12-10 01:38:28 +00:00
David Blaikie 7c5da41c70 DebugInfo: Correct location information for array accesses to elements of variable array type.
llvm-svn: 223902
2014-12-10 01:34:25 +00:00
Oleksiy Vyalov 859e4b5da1 Add D request handler to GDBRemoteCommunicationServer in order to support detach from inferior.
llvm-svn: 223901
2014-12-10 01:27:28 +00:00
Sean Callanan 238d897b07 Made the ASTImporter resilient if it can't import
SourceLocations.  LLDB rarely has the same files
mapped into the target AST context as the source
AST context, so the ASTImporter shouldn't expect
to see those files there.

This started to become a problem when importing
entities from modules -- these have proper source
locations, in contrast to all the ASTs LLDB
creates which have empty ones.

llvm-svn: 223900
2014-12-10 01:26:39 +00:00
David Majnemer 84f798f0eb I didn't intend to commit this with r223898
llvm-svn: 223899
2014-12-10 01:17:48 +00:00
David Majnemer 5330c69bd1 DataLayout: Move asserts over to report_fatal_error
As indicated by the tests, it is possible to feed the AsmParser an
invalid datalayout string.  We should verify the result of parsing this
string regardless of whether or not we have assertions enabled.

llvm-svn: 223898
2014-12-10 01:17:08 +00:00
David Blaikie d85548d423 DebugInfo: Fix another case of array access line information
llvm-svn: 223897
2014-12-10 01:16:09 +00:00
Matthias Braun 96d7732b08 MachineVerifier: Allow physreg use if just a subreg is defined.
We can't mark partially undefined registers, so we have to allow reading
a register in the machine verifier if just parts of a register are
defined.

llvm-svn: 223896
2014-12-10 01:13:13 +00:00
Matthias Braun 21554d9b30 MachineVerifier: Allow LiveInterval segments to end at a partial write.
In the subregister liveness tracking case we do not create implicit
reads on partial register writes anymore, still we need to produce a new
SSA value for partial writes so the live segment has to end.

llvm-svn: 223895
2014-12-10 01:13:11 +00:00
Matthias Braun 279f83645c VirtRegMap: Improve block live-in info if subregister liveness is available.
llvm-svn: 223894
2014-12-10 01:13:08 +00:00
Matthias Braun e348a09ac0 MCRegisterInfo: Add MCSubRegIndexIterator.
This iterator iterates over subregister and their associated subregister indices
at the same time.

llvm-svn: 223893
2014-12-10 01:13:06 +00:00
Matthias Braun d70caaf5a5 VirtRegMap: No implicit defs/uses for super registers with subreg liveness tracking.
Adding the implicit defs/uses to the superregisters is semantically questionable
but was not dangerous before as the register allocator never assigned the same
register to two overlapping LiveIntervals even when the actually live
subregisters do not overlap. With subregister liveness tracking enabled this
does actually happen and leads to subsequent bugs if we don't stop adding
the superregister defs/uses.

llvm-svn: 223892
2014-12-10 01:13:04 +00:00
Matthias Braun 587e27415d LiveRegMatrix: Respect subregister liveness when allocating registers.
llvm-svn: 223891
2014-12-10 01:13:01 +00:00
Matthias Braun a0f0c1f013 LiveIntervalUnion: Allow specification of liverange when unifying/extracting.
This allows it to add subregister ranges into the union.

llvm-svn: 223890
2014-12-10 01:12:59 +00:00
Matthias Braun 755f8b1885 Tablegen'erate lanemasks for register units.
Now we can relate lanemasks in a virtual register to register units.

llvm-svn: 223889
2014-12-10 01:12:56 +00:00
Matthias Braun 14f764c872 RegisterCoalescer: Preserve subregister liveranges.
llvm-svn: 223888
2014-12-10 01:12:52 +00:00
Matthias Braun 2079aa9140 LiveInterval: Add removeEmptySubRanges().
llvm-svn: 223887
2014-12-10 01:12:40 +00:00
Matthias Braun 8970d847c4 LiveIntervalAnalysis: Add subregister aware variants pruneValue().
llvm-svn: 223886
2014-12-10 01:12:36 +00:00
Matthias Braun 630e42e176 LiveInterval: Introduce LiveQuery accessor for dead or live out values.
llvm-svn: 223885
2014-12-10 01:12:33 +00:00
Matthias Braun e3d3b88cb9 Add a flag to enable/disable subregister liveness.
llvm-svn: 223884
2014-12-10 01:12:30 +00:00
Matthias Braun e5f861b781 LiveIntervalAnalysis: Adapt repairIntervalsInRange() to subregister liveness.
llvm-svn: 223883
2014-12-10 01:12:26 +00:00
Matthias Braun fe896c703c LiveRangeEdit: Adapt eliminateDeadDef() to subregister liveness.
llvm-svn: 223882
2014-12-10 01:12:23 +00:00
Matthias Braun 7044d69e87 LiveIntervalAnalysis: Adapt handleMove() to subregister ranges.
llvm-svn: 223881
2014-12-10 01:12:20 +00:00
Matthias Braun 20e1f38a41 LiveIntervalAnalysis: Update SubRanges in shrinkToUses().
llvm-svn: 223880
2014-12-10 01:12:18 +00:00
Matthias Braun bf49cfe3ec LiveIntervalAnalysis: Make computeDeadValues() private.
llvm-svn: 223879
2014-12-10 01:12:15 +00:00
Matthias Braun 2f66232bde LiveIntervalAnalysis: Compute subregister ranges.
llvm-svn: 223878
2014-12-10 01:12:12 +00:00