Johannes Doerfert [Thu, 5 Mar 2015 00:43:48 +0000 (00:43 +0000)]
Create a dependence struct to hold dependence information for a SCoP.
The new Dependences struct in the DependenceInfo holds all information
that was formerly part of the DependenceInfo. It also provides the
same interface for the user to access this information.
This is another step to a more general ScopPass interface that does
allow multiple SCoPs to be "in flight".
llvm-svn: 231327
Johannes Doerfert [Thu, 5 Mar 2015 00:40:07 +0000 (00:40 +0000)]
Add missing forward declaration [NFC]
llvm-svn: 231326
Alexey Samsonov [Thu, 5 Mar 2015 00:33:11 +0000 (00:33 +0000)]
[ASan] Fix asan-(32|64)-bits lit tests feature.
It broke down at some point, and all tests with
REQUIRES: asan-(32|64)-bits
line stopped being executed. Restore the intended behavior.
llvm-svn: 231325
Eric Christopher [Thu, 5 Mar 2015 00:28:55 +0000 (00:28 +0000)]
Remove the conditional addition of the execution dependency fixing
pass from the ARM backend as the pass itself will detect any use
of the appropriate register class.
llvm-svn: 231324
Eric Christopher [Thu, 5 Mar 2015 00:23:40 +0000 (00:23 +0000)]
Cleanup and remove a chunk of getARMSubtarget calls in the
ARM TargetMachine pass pipeline construction by pushing them down
into the appropriate pass.
llvm-svn: 231323
Paul Robinson [Thu, 5 Mar 2015 00:08:27 +0000 (00:08 +0000)]
Turn off .debug_pubnames/pubtypes for PS4.
Differential Revision: http://reviews.llvm.org/D8067
llvm-svn: 231322
Rui Ueyama [Thu, 5 Mar 2015 00:07:38 +0000 (00:07 +0000)]
Use range-based for loops to iterate over file nodes.
I converted them to non-range-based loops in r226883 and r226893
because at that moment File::parse() may have side effects and
may update the vector that the reference returned from
LinkingContext::nodes().
Now File::parse() is free from side effects. We can use range-based
loops again.
llvm-svn: 231321
Reid Kleckner [Thu, 5 Mar 2015 00:04:18 +0000 (00:04 +0000)]
Give some obj-c rewriter tests that use MS pragmas a triple as a speculative fix
llvm-svn: 231320
Kostya Serebryany [Wed, 4 Mar 2015 23:41:55 +0000 (23:41 +0000)]
[sanitizer] when dumping coverage bitset, dump seperate file for every module, instead of dumping a single combined bitset
llvm-svn: 231319
Rick Foos [Wed, 4 Mar 2015 23:40:38 +0000 (23:40 +0000)]
Temporary XFAILs for Hexagon
Summary: Temporary XFAIL's until patches done.
Reviewers: echristo, adasgupt, colinl
Reviewed By: colinl
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8044
llvm-svn: 231318
Reid Kleckner [Wed, 4 Mar 2015 23:39:17 +0000 (23:39 +0000)]
Implement section pragma feedback on r205810
Mostly short-circuits some conditionals. Adds target validation of
sections passed to these pragmas.
llvm-svn: 231317
Rui Ueyama [Wed, 4 Mar 2015 23:22:48 +0000 (23:22 +0000)]
PECOFF: Update comments on .drectve section encoding.
llvm-svn: 231316
Enrico Granata [Wed, 4 Mar 2015 23:19:36 +0000 (23:19 +0000)]
Appease the Windows bot
llvm-svn: 231315
Anton Yartsev [Wed, 4 Mar 2015 23:18:21 +0000 (23:18 +0000)]
[analyzer] Bug fix: do not report leaks for alloca()
llvm-svn: 231314
Aaron Ballman [Wed, 4 Mar 2015 23:17:31 +0000 (23:17 +0000)]
Initializer lists are supported in MSVC 2013. Since that's our minimum required version, we can move that to the list of acceptable C++11 features.
llvm-svn: 231313
Hans Wennborg [Wed, 4 Mar 2015 23:16:21 +0000 (23:16 +0000)]
Pass -dll to link.exe when building with -shared (PR22697)
And start building a test for non-clang-cl link.exe invocations.
llvm-svn: 231312
Marshall Clow [Wed, 4 Mar 2015 23:09:15 +0000 (23:09 +0000)]
Move the <dynarray> tests out of the std/ hierarchy, since it's not really part of the standard any more.
llvm-svn: 231311
Enrico Granata [Wed, 4 Mar 2015 22:59:20 +0000 (22:59 +0000)]
Introduce lldbassert(x)
We would like it if LLDB never crashed, especially if we never caused LLDB to crash
On the other hand, having assertions can sometimes be useful
lldbassert(x) is the best of both worlds:
- in debug builds, it turns into a regular assert, which is fine because we don't mind debug LLDB to crash on development machines
- in non-debug builds, it emits a message formatted just like assert(x) would, but then instead of crashing, it dumps a backtrace, suggests filing a bug, and keeps running
llvm-svn: 231310
Argyrios Kyrtzidis [Wed, 4 Mar 2015 22:54:38 +0000 (22:54 +0000)]
[Support] Increase timeout for the LockFileManager back to 5 mins.
Waiting for just 1 min may not be enough for some contexts.
llvm-svn: 231309
Johannes Doerfert [Wed, 4 Mar 2015 22:43:40 +0000 (22:43 +0000)]
Rename the Dependences pass to DependenceInfo [NFC]
We rename the Dependences pass to DependenceInfo as a first step to a
caching pass policy. The new DependenceInfo pass will later provide
"Dependences" for a SCoP.
To keep consistency the test folder is renamed too.
llvm-svn: 231308
Matthias Braun [Wed, 4 Mar 2015 22:31:18 +0000 (22:31 +0000)]
Improve test robustness
Improve test robustness in preparation of coming commits:
- Avoid undefs which may get propagated too much.
- Remove several pointless add 0, instructions
llvm-svn: 231307
Sanjoy Das [Wed, 4 Mar 2015 22:24:23 +0000 (22:24 +0000)]
[IndVarSimplify] use the "canonical" way to infer no-wrap.
Summary:
rL225282 introduced an ad-hoc way to promote some additions to nuw or
nsw. Since then SCEV has become smarter in directly proving no-wrap;
and using the canonical "ext(A op B) == ext(A) op ext(B)" method of
proving no-wrap is just as powerful now. Rip out the existing
complexity in favor of getting SCEV to do all the heaving lifting
internally.
This change does not add any unit tests because it is supposed to be a
non-functional change. Tests added in rL225282 and rL226075 are valid
tests for this change.
Reviewers: atrick, majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7981
llvm-svn: 231306
Sanjoy Das [Wed, 4 Mar 2015 22:24:17 +0000 (22:24 +0000)]
[SCEV] make SCEV smarter about proving no-wrap.
Summary:
Teach SCEV to prove no overflow for an add recurrence by proving
something about the range of another add recurrence a loop-invariant
distance away from it.
Reviewers: atrick, hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7980
llvm-svn: 231305
Johannes Doerfert [Wed, 4 Mar 2015 22:23:21 +0000 (22:23 +0000)]
Simplify dropConstantScheduleDims [NFC]
llvm-svn: 231304
David Blaikie [Wed, 4 Mar 2015 22:20:52 +0000 (22:20 +0000)]
Provide an explicit move ctor because MSVC can't synthesize one
llvm-svn: 231303
David Blaikie [Wed, 4 Mar 2015 22:15:41 +0000 (22:15 +0000)]
Fix the clang self-host -Werror build
Sorry about the breakage.
llvm-svn: 231302
Rui Ueyama [Wed, 4 Mar 2015 22:13:25 +0000 (22:13 +0000)]
PECOFF: Do not add layout-after edges.
The last use of layout-after edge for PE/COFF was removed in r231290.
Now layout-after edges do nothing. We can stop adding them to the graph.
No functionality change intended.
llvm-svn: 231301
Frederic Riss [Wed, 4 Mar 2015 22:07:44 +0000 (22:07 +0000)]
[dsymutil] Add minimal code to emit DIE trees.
This commit adds code to emit DIE trees that have been pruned from the
parts that haven't been marked as kept in the previous pass.
It works by 'cloning' the input DIE tree (as read by libDebugInfoDwarf)
into a tree of DIE objects. Cloning the DIEs means essentially cloning
their attributes. The code in this commit does only handle scalar and
block attributes (scalar because they are trivial, blocks because they
can't be easily replaced by a scalr placeholder), all the other ones
are replaced by placeholder zero values and will be handled in
further commits.
The added tests mostly check that the DIE tree has the correct layout and
also verify that a few chosen scalar and block attributes correctly make
their way into the output.
llvm-svn: 231300
Frederic Riss [Wed, 4 Mar 2015 22:07:41 +0000 (22:07 +0000)]
DWARFFormValue: Add getAsSignedConstant method.
The implementation accepts explicitely signed forms (DW_FORM_sdata),
but also unsigned forms as long as they fit in an int64_t.
llvm-svn: 231299
Frederic Riss [Wed, 4 Mar 2015 22:07:36 +0000 (22:07 +0000)]
Teach DIEInteger to emit FORM_strp and FORM_ref_addr attributes.
To be used/tested by llvm-dsymutil. (llvm-dsymutil does a 'static' link,
no need for relocations for most things, so it'll just emit raw integers
for most attributes)
llvm-svn: 231298
Frederic Riss [Wed, 4 Mar 2015 22:07:30 +0000 (22:07 +0000)]
Make the DWARFAbbreviationDeclaration::AttributeSpec type public.
It was already exposed through the iterators anyway.
llvm-svn: 231297
David Blaikie [Wed, 4 Mar 2015 22:06:14 +0000 (22:06 +0000)]
Update LangRef for explicit type changes to 'load' instruction
llvm-svn: 231296
Rafael Espindola [Wed, 4 Mar 2015 22:03:21 +0000 (22:03 +0000)]
Expand variables when evaluating absolute expressions.
This allows for variables to be used in .size.
This matches gnu AS functionality.
llvm-svn: 231295
David Blaikie [Wed, 4 Mar 2015 22:02:58 +0000 (22:02 +0000)]
Update LangRef for getelementptr explicit type changes
Here's a rough/first draft - it at least hits the actual textual IR
examples and some of the phrasing. It's probably worth a full pass over,
but I'm not sure how much these docs should reflect the strange
intermediate state we're in anyway.
Totally open to lots of review/feedback/suggestions.
llvm-svn: 231294
Alexey Samsonov [Wed, 4 Mar 2015 21:54:20 +0000 (21:54 +0000)]
[Sanitizer] Fix/suppress compiler warnings in unit tests.
llvm-svn: 231293
Sanjay Patel [Wed, 4 Mar 2015 21:49:03 +0000 (21:49 +0000)]
don't repeat class / function / variable names in comments; NFC
llvm-svn: 231292
Nemanja Ivanovic [Wed, 4 Mar 2015 21:48:22 +0000 (21:48 +0000)]
Add Clang support for PPC cryptography builtins
Review: http://reviews.llvm.org/D7951
llvm-svn: 231291
Rui Ueyama [Wed, 4 Mar 2015 21:40:46 +0000 (21:40 +0000)]
Define DefinedAtom::sectionSize.
Merge::mergeByLargestSection is half-baked since it's defined
in terms of section size, there's no way to get the section size
of an atom.
Currently we work around the issue by traversing the layout edges
to both directions and calculate the sum of all atoms reachable.
I wrote that code but I knew it's hacky. It's even not guaranteed
to work. If you add layout edges before the core linking, it
miscalculates a size.
Also it's of course slow. It's basically a linked list traversal.
In this patch I added DefinedAtom::sectionSize so that we can use
that for mergeByLargestSection. I'm not very happy to add a new
field to DefinedAtom base class, but I think it's legitimate since
mergeByLargestSection is defined for section size, and the section
size is currently just missing.
http://reviews.llvm.org/D7966
llvm-svn: 231290
Alexey Samsonov [Wed, 4 Mar 2015 21:38:10 +0000 (21:38 +0000)]
Exclude LLVM sources from lint check.
Checking files from different repository is not nice, and LLVM code
follows its own style guide anyway.
llvm-svn: 231289
Enrico Granata [Wed, 4 Mar 2015 21:33:45 +0000 (21:33 +0000)]
Add a required #include
llvm-svn: 231288
Jim Ingham [Wed, 4 Mar 2015 21:28:55 +0000 (21:28 +0000)]
Fix a thinko in the case where we return a launch error with no error
string. Return "<unknown error>" rather than the empty launch error...
<rdar://problem/
20026469>
llvm-svn: 231287
Paul Robinson [Wed, 4 Mar 2015 20:55:11 +0000 (20:55 +0000)]
Support standard DWARF TLS opcode; Darwin and PS4 use it.
Differential Revision: http://reviews.llvm.org/D8018
llvm-svn: 231286
Nemanja Ivanovic [Wed, 4 Mar 2015 20:44:33 +0000 (20:44 +0000)]
Add LLVM support for PPC cryptography builtins
Review: http://reviews.llvm.org/D7955
llvm-svn: 231285
Reid Kleckner [Wed, 4 Mar 2015 20:38:59 +0000 (20:38 +0000)]
Try to satisfy sanitizer lint check
llvm-svn: 231284
Kostya Serebryany [Wed, 4 Mar 2015 20:32:06 +0000 (20:32 +0000)]
[sanitizer] Since x32 runs under 64-bit kernel, GetKernelAreaSize should return 0
llvm-svn: 231283
David Blaikie [Wed, 4 Mar 2015 19:56:44 +0000 (19:56 +0000)]
Add a FIXME for PR22796, broken ordering of ClassInfo in TableGen
As discussed (at length) in code review of r222935, with Duncan.
llvm-svn: 231282
Tobias Grosser [Wed, 4 Mar 2015 19:33:31 +0000 (19:33 +0000)]
Remove unnecessary dynamic memory management
llvm-svn: 231281
Reid Kleckner [Wed, 4 Mar 2015 19:24:16 +0000 (19:24 +0000)]
Fix test/CodeGen/builtins.c for platforms that don't lower sjlj
Opt in Win64 to supporting sjlj lowering. We have the backend lowering,
so I think this was just an oversight because WinX86_64TargetCodeGenInfo
doesn't inherit from X86_64TargetCodeGenInfo.
llvm-svn: 231280
Rafael Espindola [Wed, 4 Mar 2015 19:15:29 +0000 (19:15 +0000)]
Fix the build of the gold-plugin and examples.
llvm-svn: 231279
Reid Kleckner [Wed, 4 Mar 2015 19:10:41 +0000 (19:10 +0000)]
Try to fix the build after removing DataLayoutPass
llvm-svn: 231278
Reid Kleckner [Wed, 4 Mar 2015 19:06:17 +0000 (19:06 +0000)]
Add missing <atomic> include to PassRegistry.h
llvm-svn: 231277
Erik Eckstein [Wed, 4 Mar 2015 18:57:11 +0000 (18:57 +0000)]
Add a lock() function in PassRegistry to speed up multi-thread synchronization.
When calling lock() after all passes are registered, the PassRegistry doesn't need a mutex anymore to look up passes.
This speeds up multithreaded llvm execution by ~5% (tested with 4 threads).
In an asserts build of llvm this has an even bigger impact.
Note that it's not required to use the lock function.
llvm-svn: 231276
David Blaikie [Wed, 4 Mar 2015 18:52:32 +0000 (18:52 +0000)]
Recommit r231221: "Devirtualize ~parser<T> by making it protected in base classes and making derived classes final"
Reverted in r231254 due to a self-hosting crash of Clang (see Clang
PR22793). Workaround the crash by using {} instead of = default to
define a dtor.
llvm-svn: 231274
Rafael Espindola [Wed, 4 Mar 2015 18:51:45 +0000 (18:51 +0000)]
Bring r231132 back with a fix.
The issue was that we were always printing the remarks. Fix that and add a test
showing that it prints nothing if -pass-remarks is not given.
Original message:
Correctly handle -pass-remarks in the gold plugin.
llvm-svn: 231273
Tobias Grosser [Wed, 4 Mar 2015 18:51:27 +0000 (18:51 +0000)]
Allow to build shared libraries if BUILD_SHARED_LIBS is enabled
Contributed-by: Richard Membarth <richard.membarth@uni-saarland.de>
llvm-svn: 231272
Rui Ueyama [Wed, 4 Mar 2015 18:51:19 +0000 (18:51 +0000)]
Remove "inline" from inlined functions.
llvm-svn: 231271
Mehdi Amini [Wed, 4 Mar 2015 18:43:29 +0000 (18:43 +0000)]
Make DataLayout Non-Optional in the Module
Summary:
DataLayout keeps the string used for its creation.
As a side effect it is no longer needed in the Module.
This is "almost" NFC, the string is no longer
canonicalized, you can't rely on two "equals" DataLayout
having the same string returned by getStringRepresentation().
Get rid of DataLayoutPass: the DataLayout is in the Module
The DataLayout is "per-module", let's enforce this by not
duplicating it more than necessary.
One more step toward non-optionality of the DataLayout in the
module.
Make DataLayout Non-Optional in the Module
Module->getDataLayout() will never returns nullptr anymore.
Reviewers: echristo
Subscribers: resistor, llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D7992
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 231270
Reid Kleckner [Wed, 4 Mar 2015 18:31:10 +0000 (18:31 +0000)]
Revert "unique_ptrify ValID::ConstantStructElts"
This reverts r231200 and r231204. The second one added an explicit move
ctor for MSVC.
This change broke the clang-cl self-host due to weirdness in MSVC's
implementation of std::map::insert. Somehow we lost our rvalue ref-ness
when going through variadic placement new:
template <class _Objty, class... _Types>
void construct(_Objty *_Ptr,
_Types &&... _Args) { // construct _Objty(_Types...) at _Ptr
::new ((void *)_Ptr) _Objty(_STD forward<_Types>(_Args)...);
}
For some reason, Clang decided to call the deleted std::pair copy
constructor at this point. Needs further investigation, once I can
build.
llvm-svn: 231269
Tobias Grosser [Wed, 4 Mar 2015 18:14:59 +0000 (18:14 +0000)]
Add support for conditional 'and' and 'or' expressions
No test cases unfortunately as we do not yet generate isl_ast_op_and_then or
isl_ast_op_or_else. Those will be added in a later commit.
llvm-svn: 231268
Alexander Kornienko [Wed, 4 Mar 2015 18:01:10 +0000 (18:01 +0000)]
[clang-tidy] Fix namespace comments. NFC.
llvm-svn: 231267
Gabor Horvath [Wed, 4 Mar 2015 17:59:34 +0000 (17:59 +0000)]
[analyzer] Individual configuration options can be specified for checkers.
Reviewed by: Anna Zaks
Original patch by: Aleksei Sidorin
Differential Revision: http://reviews.llvm.org/D7905
llvm-svn: 231266
Alex Denisov [Wed, 4 Mar 2015 17:55:52 +0000 (17:55 +0000)]
New ObjC warning: circular containers.
This commit adds new warning to prevent user from creating 'circular containers'.
Mutable collections from NSFoundation allows user to add collection to itself, e.g.:
NSMutableArray *a = [NSMutableArray new];
[a addObject:a];
The code above leads to really weird behaviour (crashes, 'endless' recursion) and
retain cycles (collection retains itself) if ARC enabled.
Patch checks the following collections:
- NSMutableArray,
- NSMutableDictionary,
- NSMutableSet,
- NSMutableOrderedSet,
- NSCountedSet.
llvm-svn: 231265
Wei Mi [Wed, 4 Mar 2015 17:44:22 +0000 (17:44 +0000)]
Revert the test commit.
llvm-svn: 231264
Zachary Turner [Wed, 4 Mar 2015 17:43:00 +0000 (17:43 +0000)]
Don't #include clang headers from BreakpointLocation.h
llvm-svn: 231263
Wei Mi [Wed, 4 Mar 2015 17:41:17 +0000 (17:41 +0000)]
Test commit. It will be reverted in the next commit.
llvm-svn: 231262
Adrian Prantl [Wed, 4 Mar 2015 17:39:59 +0000 (17:39 +0000)]
Update the out-of-date dwarf expressions in these testcases.
llvm-svn: 231261
Adrian Prantl [Wed, 4 Mar 2015 17:39:33 +0000 (17:39 +0000)]
Fix DwarfExpression::AddMachineRegExpression so it doesn't read past the
end of an expression that ends with DW_OP_plus.
Caught by the ASAN build bots.
llvm-svn: 231260
Marek Olsak [Wed, 4 Mar 2015 17:33:45 +0000 (17:33 +0000)]
R600/SI: Add an intrinsic for S_FLBIT_I32 / V_FFBH_I32
Required by OpenGL (ARB_gpu_shader5).
llvm-svn: 231259
Nemanja Ivanovic [Wed, 4 Mar 2015 17:09:12 +0000 (17:09 +0000)]
Test commit. Removed an unnecessary space
llvm-svn: 231257
David Blaikie [Wed, 4 Mar 2015 17:01:18 +0000 (17:01 +0000)]
Explicitly default ilistTest::Node's copy constructor
In the presence of a user-declared dtor, calling an implicit copy ctor
is deprecated in C++11.
llvm-svn: 231256
Marshall Clow [Wed, 4 Mar 2015 16:50:02 +0000 (16:50 +0000)]
Nbjoerg suggested a better name for the macro for the default rune table: _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
llvm-svn: 231255
NAKAMURA Takumi [Wed, 4 Mar 2015 16:24:40 +0000 (16:24 +0000)]
Revert r231221, "Devirtualize ~parser<T> by making it protected in base classes and making derived classes final"
It broke seflhosting.
llvm-svn: 231254
NAKAMURA Takumi [Wed, 4 Mar 2015 16:24:28 +0000 (16:24 +0000)]
Revert r231132, "Correctly handle -pass-remarks in the gold plugin.", for now, to suppress log floodng in LTO.
llvm-svn: 231253
Marshall Clow [Wed, 4 Mar 2015 16:10:14 +0000 (16:10 +0000)]
Create a default rune table for libc++. Initial setting - never enabled. The expectation is that some targets (Android, cough) will enable it. Note that this is an implementation detail, not an interface change.
llvm-svn: 231252
Argyrios Kyrtzidis [Wed, 4 Mar 2015 16:03:07 +0000 (16:03 +0000)]
[Modules] Fix crash in Preprocessor::getLastMacroWithSpelling().
Macro names that got undefined inside a module may not have their MacroInfo set.
llvm-svn: 231251
JF Bastien [Wed, 4 Mar 2015 15:47:57 +0000 (15:47 +0000)]
Mutate TargetLowering::shouldExpandAtomicRMWInIR to specifically dictate how AtomicRMWInsts are expanded.
Summary:
In PNaCl, most atomic instructions have their own @llvm.nacl.atomic.* function, each one, with a few exceptions, represents a consistent behaviour across all NaCl-supported targets. Unfortunately, the atomic RMW operations nand, [u]min, and [u]max aren't directly represented by any such @llvm.nacl.atomic.* function. This patch refines shouldExpandAtomicRMWInIR in TargetLowering so that a future `Le32TargetLowering` class can selectively inform the caller how the target desires the atomic RMW instruction to be expanded (ie via load-linked/store-conditional for ARM/AArch64, via cmpxchg for X86/others?, or not at all for Mips) if at all.
This does not represent a behavioural change and as such no tests were added.
Patch by: Richard Diamond.
Reviewers: jfb
Reviewed By: jfb
Subscribers: jfb, aemerson, t.p.northover, llvm-commits
Differential Revision: http://reviews.llvm.org/D7713
llvm-svn: 231250
Jozef Kolek [Wed, 4 Mar 2015 15:47:42 +0000 (15:47 +0000)]
[mips][microMIPS] Make usage of ADDU16 and SUBU16 by code generator
Differential Revision: http://reviews.llvm.org/D7609
llvm-svn: 231249
Daniel Jasper [Wed, 4 Mar 2015 15:02:22 +0000 (15:02 +0000)]
Revert "[IAS] Teach -cc1as about the 'target-abi' option."
This reverts commit
0e41c8faeff75614cf4627533331d780ba3db030.
This is breaking buildbots:
http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/4668/
llvm-svn: 231248
Daniel Jasper [Wed, 4 Mar 2015 15:02:17 +0000 (15:02 +0000)]
Prevent test from writing files.
llvm-svn: 231247
Bill Schmidt [Wed, 4 Mar 2015 14:56:05 +0000 (14:56 +0000)]
[PowerPC] Remove unnecessary and incomplete commentary
This "itinerary class map" in PPCSchedule.td is incomplete and
redundant with the actual code. As it provides no value, we've
decided to remove it.
No functional change.
llvm-svn: 231246
Joerg Sonnenberger [Wed, 4 Mar 2015 14:25:35 +0000 (14:25 +0000)]
Adjust the changes from r230255 to bail out if the backend can't lower
__builtin_setjmp/__builtin_longjmp and don't fall back to the libc
functions.
llvm-svn: 231245
Toma Tabacu [Wed, 4 Mar 2015 14:24:25 +0000 (14:24 +0000)]
[IAS] Teach -cc1as about the 'target-abi' option.
Summary:
When using the IAS from clang, the 'target-abi' option gets passed to cc1as, but cc1as doesn't know about it and gives an "unknown argument" error.
This is fixed by adding the 'CC1AsOption' flag to the 'target-abi' option in CC1Options.td.
Reviewers: atanasyan, echristo, dsanders
Reviewed By: dsanders
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7903
llvm-svn: 231244
Andrea Di Biagio [Wed, 4 Mar 2015 14:23:25 +0000 (14:23 +0000)]
[X86][FastISel] Simplify the logic in method X86SelectSIToFP.
The target-independent selection algorithm in FastISel already knows how
to select a SINT_TO_FP if the target is SSE but not AVX.
On targets that have SSE but not AVX, the tablegen'd 'fastEmit' functions
for ISD::SINT_TO_FP know how to select instruction X86::CVTSI2SSrr
(for an i32 to f32 conversion) and X86::CVTSI2SDrr (for an i32 to f64
conversion).
This patch simplifies the logic in method X86SelectSIToFP knowing that
the code would not be reachable if the subtarget doesn't have AVX.
No functional change intended.
llvm-svn: 231243
Daniel Jasper [Wed, 4 Mar 2015 14:18:20 +0000 (14:18 +0000)]
Move one more diagnostic into the new -Wformat-pedantic group.
This was apparently overlooked in r231211.
llvm-svn: 231242
Dmitry Vyukov [Wed, 4 Mar 2015 13:27:53 +0000 (13:27 +0000)]
asan: do not instrument direct inbounds accesses to stack variables
Do not instrument direct accesses to stack variables that can be
proven to be inbounds, e.g. accesses to fields of structs on stack.
But it eliminates 33% of instrumentation on webrtc/modules_unittests
(number of memory accesses goes down from 290152 to 193998) and
reduces binary size by 15% (from 74M to 64M) and improved compilation time by 6-12%.
The optimization is guarded by asan-opt-stack flag that is off by default.
http://reviews.llvm.org/D7583
llvm-svn: 231241
Toma Tabacu [Wed, 4 Mar 2015 13:01:14 +0000 (13:01 +0000)]
[mips] Rename the LA/LI/DLI TableGen definitions and classes. NFC.
Summary:
Use more reasonable names for these pseudo-instructions.
As there's only one definition tied to any one of these classes, I named them with abbreviated versions of their respective class' name.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7831
llvm-svn: 231240
Vasileios Kalintiris [Wed, 4 Mar 2015 12:37:58 +0000 (12:37 +0000)]
[mips] Keep the parameter list of Filler::searchRange() consistent. NFC.
Summary:
Move the "Filler" parameter to the end of the parameter list as it is,
conceptually, the only output parameter of that function.
Reviewers: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7726
llvm-svn: 231239
Chandler Carruth [Wed, 4 Mar 2015 12:18:08 +0000 (12:18 +0000)]
[MBP] Fix a really horrible bug in MachineBlockPlacement, but behind
a flag for now.
First off, thanks to Daniel Jasper for really pointing out the issue
here. It's been here forever (at least, I think it was there when
I first wrote this code) without getting really noticed or fixed.
The key problem is what happens when two reasonably common patterns
happen at the same time: we outline multiple cold regions of code, and
those regions in turn have diamonds or other CFGs for which we can't
just topologically lay them out. Consider some C code that looks like:
if (a1()) { if (b1()) c1(); else d1(); f1(); }
if (a2()) { if (b2()) c2(); else d2(); f2(); }
done();
Now consider the case where a1() and a2() are unlikely to be true. In
that case, we might lay out the first part of the function like:
a1, a2, done;
And then we will be out of successors in which to build the chain. We go
to find the best block to continue the chain with, which is perfectly
reasonable here, and find "b1" let's say. Laying out successors gets us
to:
a1, a2, done; b1, c1;
At this point, we will refuse to lay out the successor to c1 (f1)
because there are still un-placed predecessors of f1 and we want to try
to preserve the CFG structure. So we go get the next best block, d1.
... wait for it ...
Except that the next best block *isn't* d1. It is b2! d1 is waaay down
inside these conditionals. It is much less important than b2. Except
that this is exactly what we didn't want. If we keep going we get the
entire set of the rest of the CFG *interleaved*!!!
a1, a2, done; b1, c1; b2, c2; d1, f1; d2, f2;
So we clearly need a better strategy here. =] My current favorite
strategy is to actually try to place the block whose predecessor is
closest. This very simply ensures that we unwind these kinds of CFGs the
way that is natural and fitting, and should minimize the number of cache
lines instructions are spread across.
It also happens to be *dead simple*. It's like the datastructure was
specifically set up for this use case or something. We only push blocks
onto the work list when the last predecessor for them is placed into the
chain. So the back of the worklist *is* the nearest next block.
Unfortunately, a change like this is going to cause *soooo* many
benchmarks to swing wildly. So for now I'm adding this under a flag so
that we and others can validate that this is fixing the problems
described, that it seems possible to enable, and hopefully that it fixes
more of our problems long term.
llvm-svn: 231238
Vasileios Kalintiris [Wed, 4 Mar 2015 12:10:18 +0000 (12:10 +0000)]
[mips] Specify the correct value type when combining a CMovFP node.
This commit fixes a bug introduced in r230956 where we were creating
CMovFP_{T,F} nodes with multiple return value types (one for each operand).
With this change the return value type of the new node is the same as the
value type of the True/False operands of the original node.
llvm-svn: 231237
Alexander Kornienko [Wed, 4 Mar 2015 12:07:50 +0000 (12:07 +0000)]
[clang-tidy] Output more diagnostics in check_clang_tidy.sh
Print clang-tidy output and fixes applied.
llvm-svn: 231236
Ilia K [Wed, 4 Mar 2015 12:05:24 +0000 (12:05 +0000)]
Fix build on OS X after r231202
llvm-svn: 231235
Tamas Berghammer [Wed, 4 Mar 2015 11:34:10 +0000 (11:34 +0000)]
Set the signals based on the OS in the qHostInfo packet
Setting it from the Target architecture cause problems when the target
archiutecture is filled just by examining the executable because in that
case the OS isn't set.
Differential revision: http://reviews.llvm.org/D8035
llvm-svn: 231234
Ilia K [Wed, 4 Mar 2015 11:21:18 +0000 (11:21 +0000)]
Added long 'print-values' option for var-update MI command.
Summary:
The -var-update MI command should take the same print-values options as var-list children, however currently only the integer versions are supported.
Added --no-values, --all-values, and --simple-values long options.
See:
https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Variable-Objects.html#GDB_002fMI-Variable-Objects
Patch from ewan@codeplay.com
Reviewers: EwanCrawford
Subscribers: ki.stfu, lldb-commits
Differential Revision: http://reviews.llvm.org/D8008
llvm-svn: 231233
Tamas Berghammer [Wed, 4 Mar 2015 11:18:34 +0000 (11:18 +0000)]
Fix expectation for TestPlatformCommand.test_shell
* Create expectation based on target platform
* Add custom expectation for remote android target
Differential revision: http://reviews.llvm.org/D8031
llvm-svn: 231232
Tamas Berghammer [Wed, 4 Mar 2015 11:10:03 +0000 (11:10 +0000)]
Fix deadlock in operation thread in NativeProcessLinux
The deadlock occurred when the Attach or the Launch operation failed for
any reason.
Differential revision: http://reviews.llvm.org/D8030
llvm-svn: 231231
Daniel Jasper [Wed, 4 Mar 2015 11:05:34 +0000 (11:05 +0000)]
Add a flag to experiment with outlining optional branches.
In a CFG with the edges A->B->C and A->C, B is an optional branch.
LLVM's default behavior is to lay the blocks out naturally, i.e. A, B,
C, in order to improve code locality and fallthroughs. However, if a
function contains many of those optional branches only a few of which
are taken, this leads to a lot of unnecessary icache misses. Moving B
out of line can work around this.
Review: http://reviews.llvm.org/D7719
llvm-svn: 231230
Pavel Labath [Wed, 4 Mar 2015 10:28:15 +0000 (10:28 +0000)]
Use the unified section list when generating a symbol table
Summary:
Symbol table generation code was failing to take into account the debug symbols because
the object file was looking only into its own section list when doing the generation, even though
the debug symbols from another object file were correctly detected and loaded by the
SymbolVendor. This changes the code to use the unified section list, which fixes this problem.
Test Plan:
I do not intend do submit this yet since it causes (or more like, exposes) the issue
in D7884, but I wanted to put this out here, so that anyone who wants to take a look at it can do
so. (And I also wanted to know if this is the right approach to the problem :).
Reviewers: clayborg, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D7913
llvm-svn: 231229
Pavel Labath [Wed, 4 Mar 2015 10:25:22 +0000 (10:25 +0000)]
Correctly resolve symbol names containing linker annotations
Summary:
Symbols in ELF files can be versioned, but LLDB currently does not understand these. This problem
becomes apparent once one loads glibc with debug info. Here (in the .symtab section) the versions
are embedded in the name (name@VERSION), which causes issues when evaluating expressions
referencing memcpy for example (current glibc contains memcpy@@GLIBC_2.14 and
memcpy@GLIBC_2.2.5).
This problem was not evident without debug symbols as the .dynsym section
stores the bare names and the actual versions are present in a separate section (.gnu.version_d),
which LLDB ignores. This resulted in two definitions of memcpy in the symbol table.
This patch adds support for storing annotated names to the Symbol class. If
Symbol.m_contains_linker_annotations is true then this symbol is annotated. Unannotated name can
be obtained by calling StripLinkerAnnotations on the corresponding ObjectFile. ObjectFileELF
implements this to strip @VERSION suffixes when requested. Symtab uses this function to add the
bare name as well as the annotated name to the name lookup table.
To preserve the size of the Symbol class, I had to steal one bit from the m_type field.
Test Plan:
This fixes TestExprHelpExamples.py when run with a glibc with debug symbols. Writing
an environment agnostic test case would require building a custom shared library with symbol
versions and testing symbol resolution against that, which is somewhat challenging.
Reviewers: clayborg, jingham
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8036
llvm-svn: 231228
Kristof Beyls [Wed, 4 Mar 2015 09:12:08 +0000 (09:12 +0000)]
Fix PR22408 - LLVM producing AArch64 TLS relocations that GNU linkers cannot handle yet.
As is described at http://llvm.org/bugs/show_bug.cgi?id=22408, the GNU linkers
ld.bfd and ld.gold currently only support a subset of the whole range of AArch64
ELF TLS relocations. Furthermore, they assume that some of the code sequences to
access thread-local variables are produced in a very specific sequence.
When the sequence is not as the linker expects, it can silently mis-relaxe/mis-optimize
the instructions.
Even if that wouldn't be the case, it's good to produce the exact sequence,
as that ensures that linkers can perform optimizing relaxations.
This patch:
* implements support for 16MiB TLS area size instead of 4GiB TLS area size. Ideally clang
would grow an -mtls-size option to allow support for both, but that's not part of this patch.
* by default doesn't produce local dynamic access patterns, as even modern ld.bfd and ld.gold
linkers do not support the associated relocations. An option (-aarch64-elf-ldtls-generation)
is added to enable generation of local dynamic code sequence, but is off by default.
* makes sure that the exact expected code sequence for local dynamic and general dynamic
accesses is produced, by making use of a new pseudo instruction. The patch also removes
two (AArch64ISD::TLSDESC_BLR, AArch64ISD::TLSDESC_CALL) pre-existing AArch64-specific pseudo
SDNode instructions that are superseded by the new one (TLSDESC_CALLSEQ).
llvm-svn: 231227
Craig Topper [Wed, 4 Mar 2015 09:04:54 +0000 (09:04 +0000)]
[Tablegen] Use correct result number variables with the pattern nodes they go with when handling SDTCisSameAs. No functional change as they are always both 0 unless you try to define a multi result type profile that uses SDTCisSame on one of the other results.
llvm-svn: 231226