Commit Graph

231918 Commits

Author SHA1 Message Date
Rui Ueyama 98843087cb Reject zero-sized symbols when creating copy relocations.
Copy relocations are relocations to copy data from DSOs to
executable's .bss segment at runtime. It doesn't make sense to
create such relocations for zero-sized symbols.

GNU linkers don't agree with each other. ld rejects such
relocation/symbol pair. gold don't reject that but do not create
copy relocations as well.  I took the former approach because
I don't think the latter is what user wants.

llvm-svn: 270525
2016-05-24 02:37:40 +00:00
Xinliang David Li 41518945e3 Fix typo in comment
llvm-svn: 270524
2016-05-24 02:37:07 +00:00
Rui Ueyama b7eda28aaa Use range-based for.
llvm-svn: 270523
2016-05-24 02:10:28 +00:00
Rui Ueyama 6de2e6829d Make getFdeEncoding a non-member function.
This function does not depend on EhOutputSection class.

llvm-svn: 270522
2016-05-24 02:08:38 +00:00
Mike Spertus 819fb787ce Visualize ellipses in TemplateTypeParm and TemplateTypeParmDecl
Now a TemplateTypeParm will be visualized as typename ...T if it is a pack

llvm-svn: 270521
2016-05-24 01:47:41 +00:00
Saleem Abdulrasool ec988b76cc clang-c: de-anonymize structure declaration
The statement constructed an anonymous structure which was typedefed.  The
anonymous structure has internal linkage, and that would cause an error when
building with modules.  Give the type declaration a tag name to address the
error when building with modules.

llvm-svn: 270520
2016-05-24 01:23:24 +00:00
Xinliang David Li 51fe002e67 [profile] clean up file initialization code
Also added more documentation.

llvm-svn: 270519
2016-05-24 01:23:09 +00:00
Michael Zolotukhin 96c150d154 Revert "Revert r270478 "[LoopUnroll] Enable advanced unrolling analysis by default.""
This reverts commit r270512 and reapplies r270478. Originally it caused
PR27847, but it was fixed in r270517.

llvm-svn: 270518
2016-05-24 01:22:20 +00:00
Michael Zolotukhin 3898b2b587 [LoopUnrollAnalyzer] Fix a crash in UnrolledInstAnalyzer::visitCastInst.
This fixes PR27847.

llvm-svn: 270517
2016-05-24 00:51:01 +00:00
Zachary Turner 3e78e2d43f Remove unused variable.
llvm-svn: 270516
2016-05-24 00:06:04 +00:00
Evgeniy Stepanov b62303081b [msan] Add a test for vector compare x86 intrinsics.
This was actually meant to go in with r267966, but I forgot to
git add the file. Better late than never.

llvm-svn: 270515
2016-05-24 00:04:23 +00:00
Richard Smith 22e7cc6a32 Properly track the found declaration (possibly a using-declaration) when
handling an explicit member specialization.

llvm-svn: 270514
2016-05-24 00:01:49 +00:00
Zachary Turner b09ac4a78d Fix build error
llvm-svn: 270513
2016-05-23 23:52:04 +00:00
Hans Wennborg 6951028b61 Revert r270478 "[LoopUnroll] Enable advanced unrolling analysis by default."
This caused PR27847.

llvm-svn: 270512
2016-05-23 23:42:35 +00:00
Zachary Turner aaad57440d Make a symbol visitor and use it to dump CV symbols.
Differential Revision: http://reviews.llvm.org/D20534
Reviewed By: rnk

llvm-svn: 270511
2016-05-23 23:41:13 +00:00
Justin Bogner a5690b00af test: Be consistent with clang's sanitizer lit config
The logic that sets up lit features for sanitizers is largely copied
between here and clang, except clang's was fixed some time ago to
handle multiple sanitizers (ie, Asan + Ubsan). This just makes the
code in LLVM consistent with how it's done in clang to avoid any
gotchas by users of this.

llvm-svn: 270510
2016-05-23 23:02:11 +00:00
Teresa Johnson df6edc5277 [ThinLTO] Refactor module loader handling into new LTO file (NFC)
Moved the ModuleLoader and supporting helper loadModuleFromBuffer out of
ThinLTOCodeGenerator and into new LTO.h/LTO.cpp files. This is in
preparation for a patch that will utilize these in the gold-plugin.

Note that there are some other pending patches (D20268 and D20290) that
also plan to refactor common interfaces and functionality into this same
pair of new files.

llvm-svn: 270509
2016-05-23 22:54:06 +00:00
Dan Gohman 73d7a555b9 [WebAssembly] Basic TargetTransformInfo support for SIMD128.
llvm-svn: 270508
2016-05-23 22:47:07 +00:00
David Blaikie 478c1a25fd llvm-dwp: Reduce indentation
llvm-svn: 270507
2016-05-23 22:38:06 +00:00
Mike Spertus 64aa76d9ca Visualizer for Pack template arguments
llvm-svn: 270505
2016-05-23 22:27:44 +00:00
David Blaikie d9517cb36f llvm-dwp: Split out processing of input sections to improve readability
llvm-svn: 270503
2016-05-23 22:21:10 +00:00
Kevin Enderby 4288228682 Tweak to change in r270491 to deal with the lld-x86_64-darwin13 bot having a old xar.h header.
Reviewed the change with Chris Bieneman and Pete Cooper.

llvm-svn: 270502
2016-05-23 22:18:59 +00:00
Simon Pilgrim 8a5ff3c59a [X86][SSE] Updated (V)CVTDQ2PD(Y) and (V)CVTPS2PD(Y) fast-isel codegen to match D20528
llvm-svn: 270501
2016-05-23 22:17:36 +00:00
Sanjoy Das aa83c47bab [IRCE] Optimize "uses" not branches; NFCI
This changes IRCE to optimize uses, and not branches.  This change is
NFCI since the uses we do inspect are in practice only ever going to be
the condition use in conditional branches; but this flexibility will
later allow us to analyze more complex expressions than just a direct
branch on a range check.

llvm-svn: 270500
2016-05-23 22:16:45 +00:00
Simon Pilgrim 90770c7c76 [X86][SSE] Replace lossless i32/f32 to f64 conversion intrinsics with generic IR
Both the (V)CVTDQ2PD(Y) (i32 to f64) and (V)CVTPS2PD(Y) (f32 to f64) conversion instructions are lossless and can be safely represented as generic __builtin_convertvector calls instead of x86 intrinsics without affecting final codegen.

This patch removes the clang builtins and their use in the sse2/avx headers - a future patch will deal with removing the llvm intrinsics, but that will require a bit more work.

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

llvm-svn: 270499
2016-05-23 22:13:02 +00:00
Sanjay Patel adcaef7238 [InstSimplify] add vector tests for isKnownNonZero
llvm-svn: 270498
2016-05-23 22:09:04 +00:00
Simon Pilgrim 255d854d12 [X86][SSE] The int_x86_sse41_pmovsx* intrinsics are no longer in use (not since D13002!)
llvm-svn: 270497
2016-05-23 22:01:24 +00:00
David Blaikie 05e0d2bf59 llvm-dwp: Pull out compression handling helper
llvm-svn: 270496
2016-05-23 21:58:58 +00:00
Andrew Kaylor 9c81d0fdeb Avoid including AlwaysInliner pass in opt-bisect search.
Differential Revision: http://reviews.llvm.org/D19640

llvm-svn: 270495
2016-05-23 21:57:54 +00:00
Simon Pilgrim 8cfcf586bb [X86][SSE] Added cvtdq2pd/cvtps2pd generic IR tests
Added D20528 implementations as well as existing x86 intrinsics versions

llvm-svn: 270494
2016-05-23 21:45:02 +00:00
Chaoren Lin 1245c2b39b Make sure TestRedefinitionsInInlines.py actually inlines.
Reviewers: spyffe

Subscribers: lldb-commits

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

llvm-svn: 270493
2016-05-23 21:44:34 +00:00
Justin Bogner 4a57bb5a3b PrologEpilogInserter: Avoid an infinite loop when MinCSFrameIndex == 0
Before r269750 we did the comparisons in this loop in signed ints so
that it DTRT when MinCSFrameIndex was 0. This was changed because it's
now possible for MinCSFrameIndex to be UINT_MAX, but that introduced a
bug when we were comparing `>= 0` - this is tautological in unsigned.

Rework the comparisons here to avoid issues with unsigned wrapping.

No test. I couldn't find a way to get any of the StackGrowsUp in-tree
targets to reach the code that sets MinCSFrameIndex.

llvm-svn: 270492
2016-05-23 21:40:52 +00:00
Kevin Enderby 9873e2c467 Add the printing the Mach-O (__LLVM,__bundle) xar archive file section "verbosely"
to llvm-objdump. This section is created with -fembed-bitcode option.

This requires the use of libxar and the Cmake and lit support were crafted by
Chris Bieneman!

rdar://26202242

llvm-svn: 270491
2016-05-23 21:34:12 +00:00
Zachary Turner 76f3def58a xfail TestRedefinitionsInline on Windows.
llvm-svn: 270490
2016-05-23 21:22:11 +00:00
Simon Pilgrim f615191fa6 [X86][SSE] Use shuffle/sext instead of deprecated (+ auto-upgraded) pmovsxwd intrinsic call
llvm-svn: 270489
2016-05-23 21:21:38 +00:00
Greg Clayton c226778768 We have many radars showing that stepping through C++ code can result in slow steps.
One of the things slowing us down is that ItaniumABILanguageRuntime class doesn't cache vtable to types in a map. This causes us, on every step, for every variable, to read the first pointer in a C++ type that could be dynamic and lookup the symbol, possibly in every symbol file (some symbols files on Darwin can end up having thousands of .o files when using DWARF in .o files, so thousands of .o files are searched each time). 

This fix caches lldb_private::Address (the resolved vtable symbol address in section + offset format) to TypeAndOrName instances inside the one ItaniumABILanguageRuntime in a process. This allows caching of dynamic types and stops us from always doing deep searches in each file.

<rdar://problem/18890778>

llvm-svn: 270488
2016-05-23 20:37:24 +00:00
Lang Hames 7331cc3774 [Kaleidoscope] Add an initial "Building an ORC JIT" tutorial chapter.
This is a work in progress - the chapter text is incomplete, though
the example code compiles and runs.

Feedback and patches are, as usual, most welcome.

llvm-svn: 270487
2016-05-23 20:34:19 +00:00
James Y Knight fdcc727da6 [SPARC] Fix 8 and 16-bit atomic load and store.
They were accidentally using the 32-bit load/store instruction for
8/16-bit operations, due to incorrect patterns

(8/16-bit cmpxchg and atomicrmw will be fixed in subsequent changes)

llvm-svn: 270486
2016-05-23 20:33:00 +00:00
Reid Kleckner 2280f9325e Modify emitTypeInformation to use MemoryTypeTableBuilder, take 2
This effectively revers commit r270389 and re-lands r270106, but it's
almost a rewrite.

The behavior change in r270106 was that we could no longer assume that
each LF_FUNC_ID record got its own type index. This patch adds a map
from DINode* to TypeIndex, so we can stop making that assumption.

This change also emits padding bytes between type records similar to the
way MSVC does. The size of the type record includes the padding bytes.

llvm-svn: 270485
2016-05-23 20:23:46 +00:00
Justin Lebar 91f6f07bb8 [CUDA] Add -fcuda-approx-transcendentals flag.
Summary:
This lets us emit e.g. sin.approx.f32.  See
http://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-sin

Reviewers: rnk

Subscribers: tra, cfe-commits

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

llvm-svn: 270484
2016-05-23 20:19:56 +00:00
Xinliang David Li 66a891962b [profile] clean up runtime warnings.
o make warning message more meaningful to users.
 o add suggestion to fix the problem
 o limit the max number of output.

llvm-svn: 270483
2016-05-23 20:08:58 +00:00
Richard Smith cc1b82be17 Fix filtering of prior declarations when checking for a tag redeclaration to
map to the redecl context for both decls, not just one of them, and to properly
check that the decl contexts are equivalent.

llvm-svn: 270482
2016-05-23 20:03:04 +00:00
Wei Mi f3c8f532d2 InsertPointAnalysis: Move current live interval from being a class member
to query interfaces argument; NFC

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

llvm-svn: 270481
2016-05-23 19:39:19 +00:00
Xinliang David Li e45207608c tune lowering parameter for small apps (sjeng)
llvm-svn: 270480
2016-05-23 19:29:26 +00:00
Gerolf Hoflehner 00e7092f68 [InstCombine] Fix assertion when bitcast is converted to gep
When an aggregate contains an opaque type its size cannot be
determined. This triggers an "Invalid GetElementPtrInst indices for type" assert
in function checkGEPType. The fix suppresses the conversion in this case.

http://reviews.llvm.org/D20319

llvm-svn: 270479
2016-05-23 19:23:17 +00:00
Michael Zolotukhin be080fc51d [LoopUnroll] Enable advanced unrolling analysis by default.
Summary:
This patch turns on LoopUnrollAnalyzer by default. To mitigate compile
time regressions, I chose very conservative thresholds for now. Later we
can make them more aggressive, but it might require being smarter in
which loops we're optimizing. E.g. currently the biggest issue is that
with more agressive thresholds we unroll many cold loops, which
increases compile time for no performance benefit (performance of those
loops is improved, but it doesn't matter since they are cold).

Test results for compile time(using 4 samples to reduce noise):
```
MultiSource/Benchmarks/VersaBench/ecbdes/ecbdes 5.19%
SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect  4.19%
MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow  3.39%
MultiSource/Applications/JM/lencod/lencod 1.47%
MultiSource/Benchmarks/Fhourstones-3_1/fhourstones3_1 -6.06%
```

I didn't see any performance changes in the testsuite, but it improves
some internal tests.

Reviewers: hfinkel, chandlerc

Subscribers: llvm-commits, mzolotukhin

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

llvm-svn: 270478
2016-05-23 19:10:19 +00:00
Justin Lebar f6f4a2a972 Fix DEBUG logs in MachineLICM.
Summary:
MBBs don't necessarily have a name (in my experience, they almost never
do), in which case this logging is quite unhelpful.  The number seems to
work well.

Reviewers: iteratee

Subscribers: llvm-commits

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

llvm-svn: 270477
2016-05-23 18:56:07 +00:00
Todd Fiala 562469cc69 add cmake files to Xcode project
This makes it easier to use Xcode revision diffing tools on them.

llvm-svn: 270476
2016-05-23 18:56:05 +00:00
Zachary Turner a78ecd1e6c [codeview] Refactor symbol records to use same pattern as types.
This will pave the way to introduce a full fledged symbol visitor
similar to how we have a type visitor, thus allowing the same
dumping code to be used in llvm-readobj and llvm-pdbdump.

Differential Revision: http://reviews.llvm.org/D20384
Reviewed By: rnk

llvm-svn: 270475
2016-05-23 18:49:06 +00:00
Sean Callanan 5ba3215fe3 Removed the m_decl_objects map from ClangASTContext.
m_decl_objects is problematic because it assumes that each VarDecl has a unique
variable associated with it.  This is not the case in inline contexts.

Also the information in this map can be reconstructed very easily without
maintaining the map.  The rest of the testsuite passes with this cange, and I've
added a testcase covering the inline contexts affected by this.

<rdar://problem/26278502>

llvm-svn: 270474
2016-05-23 18:30:59 +00:00