Commit Graph

194745 Commits

Author SHA1 Message Date
Rui Ueyama 584abaee67 PECOFF: Do not add layout-after edges.
Previously we needed to create atoms as a doubly-linked link, but it's
no longer needed. Also we don't use layout-after edges in PE/COFF.
Creating such edges is just waste.

llvm-svn: 230732
2015-02-27 05:05:38 +00:00
Shankar Easwaran 60aa7985cc [CMake] Cleanup
llvm-svn: 230731
2015-02-27 04:39:16 +00:00
Rui Ueyama 41c8b56a2a Twine should be used within a statement.
llvm-svn: 230730
2015-02-27 04:23:23 +00:00
Rui Ueyama 5b3d935fce Update comments, fix typos.
llvm-svn: 230729
2015-02-27 04:23:21 +00:00
Rui Ueyama e088a0f989 Use read{le,be}{16,32}. NFC.
llvm-svn: 230728
2015-02-27 04:21:40 +00:00
Richard Smith 4a7e390c12 [modules] Don't write out name lookup table entries merely because the module
happened to query them; only write them out if something new was added.

llvm-svn: 230727
2015-02-27 03:40:09 +00:00
Rui Ueyama 4a528dd5be Remove unused #includes.
llvm-svn: 230726
2015-02-27 03:23:52 +00:00
Rui Ueyama 7cea026a63 Add {read,write}{16,32,64}{le,be} functions.
Nothing wrong with reinterpret_cast<llvm::support::ulittle32_t *>(loc),
but that's redundant and not great from readability point of view.
The new functions are wrappers for that kind of reinterpet_casts.

Surprisingly or unsurprisingly, there was no use of big endian read
and write. {read,write}{16,32,64}be have no user. But I think they
still worth to be there in the header for completeness.

http://reviews.llvm.org/D7927

llvm-svn: 230725
2015-02-27 03:18:46 +00:00
Anna Zaks 8ed1d8196b [asan] Skip promotable allocas to improve performance at -O0
Currently, the ASan executables built with -O0 are unnecessarily slow.
The main reason is that ASan instrumentation pass inserts redundant
checks around promotable allocas. These allocas do not get instrumented
under -O1 because they get converted to virtual registered by mem2reg.
With this patch, ASan instrumentation pass will only instrument non
promotable allocas, giving us a speedup of 39% on a collection of
benchmarks with -O0. (There is no measurable speedup at -O1.)

llvm-svn: 230724
2015-02-27 03:12:36 +00:00
Anna Zaks 2249049db2 [compiler-rt] Allow suppression file to be relative to the location of the executable
The ASanified executable could be launched from different locations. When we
cannot find the suppression file relative to the current directory, try to
see if the specified path is relative to the location of the executable.

llvm-svn: 230723
2015-02-27 03:12:19 +00:00
David Majnemer 5bc883f39e MS ABI: Simplify the code which performs base adjustments
llvm-svn: 230722
2015-02-27 02:38:02 +00:00
Alexey Samsonov 0b0cafc8fc [Sanitizer] Print column number in SUMMARY line if it's available.
llvm-svn: 230721
2015-02-27 02:29:25 +00:00
Nico Weber 5339a52c9a Add last missing __leave test.
llvm-svn: 230720
2015-02-27 02:26:14 +00:00
Sanjoy Das b818676f6d Don't modify the DenseMap being iterated over from within the loop
that is iterating over it

Inserting elements into a `DenseMap` invalidated iterators pointing
into the `DenseMap` instance.

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

llvm-svn: 230719
2015-02-27 02:24:16 +00:00
Sanjoy Das 859e017621 Fix a use-iterator-after-invalidate error
AnalysisResult::getResultImpl reuses an iterator into a DenseMap after
inserting elements into it. This change adds code to recompute the
iterator before the second use.

llvm-svn: 230718
2015-02-27 02:19:11 +00:00
Nico Weber 497bf5587e Add another __leave test.
llvm-svn: 230717
2015-02-27 01:58:08 +00:00
Richard Smith f81c2cc6ca [modules] For an inheriting constructor, the inherited constructor is stored in
a map keyed off the canonical declaration. Don't try to set it if we're loading
some non-canonical merged declaration.

llvm-svn: 230716
2015-02-27 01:57:00 +00:00
Charles Davis 84d28de627 Target/X86: Save Win64 non-volatile registers in a Win64 ABI function.
Summary:
This change causes us to actually save non-volatile registers in a Win64
ABI function that calls a System V ABI function, and vice-versa.

Reviewers: rnk

Subscribers: llvm-commits

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

llvm-svn: 230714
2015-02-27 00:57:01 +00:00
David Majnemer f50d0a5ecf llvm-vtabledump: Dump catch/throw exception structures for MS ABI
llvm-svn: 230713
2015-02-27 00:43:58 +00:00
Richard Smith 0b88437ebd [modules] When loading in multiple canonical definitions of a template,
accumulate the set of specializations rather than overwriting one list
with another.

llvm-svn: 230712
2015-02-27 00:25:58 +00:00
Greg Clayton f9da928993 Fixed an infinite recursion bug that could happen when using python operating system plug-ins where we would ask the operating system plug-in to update its threads and this would cause the plugin to run an expression which would eventually run IRForTarget::CreateResultVariable() which would try to get the selected thread and cause re-entrant bug.
<rdar://problem/19924734>

llvm-svn: 230711
2015-02-27 00:12:22 +00:00
Eric Christopher 1cdefae9c4 Rewrite MachineOperand::print and MachineInstr::print to avoid
uses of TM->getSubtargetImpl and propagate to all calls.

This could be a debugging regression in places where we had a
TargetMachine and/or MachineFunction but don't have it as part
of the MachineInstr. Fixing this would require passing a
MachineFunction/Function down through the print operator, but
none of the existing uses in tree seem to do this.

llvm-svn: 230710
2015-02-27 00:11:34 +00:00
Alexey Samsonov 655bd0200c [CMake] Effectively revert r230683.
Clang in 32-bit mode may choose to target different architecture
than host compiler.

llvm-svn: 230709
2015-02-27 00:07:04 +00:00
Bruce Mitchener 11d86362ae Remove duplicated code for synthetic array members.
Summary:
The code for GetSyntheticArrayMemberFromPointer and
GetSyntheticArrayMemberFromArray was identical, so just collapse the
the methods into one.

Reviewers: granata.enrico, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 230708
2015-02-26 23:55:39 +00:00
Rafael Espindola 4491d0d337 Put jump tables in distinct sections if -ffunction-sections is used.
A small regression in r230411 was that we were basing the decision on
-fdata-sections.

llvm-svn: 230707
2015-02-26 23:55:11 +00:00
Bruce Mitchener 44949ff3e1 [swig] Fix some typos in the build scripts.
Reviewers: zturner, ki.stfu

Reviewed By: zturner, ki.stfu

Subscribers: ki.stfu, lldb-commits

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

llvm-svn: 230706
2015-02-26 23:53:49 +00:00
Lang Hames bee2099c49 [Orc][Kaleidoscope] More tutorial cleanup, a little extra debugging output.
llvm-svn: 230705
2015-02-26 23:52:42 +00:00
Zachary Turner aa57c0a2b9 [llvm-pdbdump] Add missing files.
llvm-svn: 230704
2015-02-26 23:51:49 +00:00
Zachary Turner d270d22f35 [llvm-pdbdump] Fix dumping of function pointers and basic types.
Function pointers were not correctly handled by the dumper, and
they would print as "* name".  They now print as
"int (__cdecl *name)(int arg1, int arg2)" as they should.

Also, doubles were being printed as floats.  This fixes that bug
as well, and adds tests for all builtin types. as well as a test
for function pointers.

llvm-svn: 230703
2015-02-26 23:49:23 +00:00
Rui Ueyama 53a93c6c39 PECOFF: allow more than one /alternatename for the same symbol.
Previously we have a string -> string map to keep the weak alias
symbol mapping. Naturally we can't define more than one weak alias
with that data structure.

This patch is to allow multiple aliases for the same symbol by
changing the map type to string -> set of string map.

llvm-svn: 230702
2015-02-26 23:43:04 +00:00
Eric Christopher 17512a95ae Remove commented out function.
(Saving files works, who knew?)

llvm-svn: 230701
2015-02-26 23:36:28 +00:00
Eric Christopher b9f0009b5a Remove DebugLoc::print(LLVMContext, raw_ostream), it was just
forwarding to the one that didn't take a context.

llvm-svn: 230700
2015-02-26 23:32:17 +00:00
Eric Christopher 11e4df73c8 getRegForInlineAsmConstraint wants to use TargetRegisterInfo for
a lookup, pass that in rather than use a naked call to getSubtargetImpl.
This involved passing down and around either a TargetMachine or
TargetRegisterInfo. Update all callers/definitions around the targets
and SelectionDAG.

llvm-svn: 230699
2015-02-26 22:38:43 +00:00
Eric Christopher d75c00c638 Add a TargetMachine argument to the AddressingModeMatcher, we'll
need this shortly to get a TargetRegisterInfo from the subtarget
for TargetLowering routines.

llvm-svn: 230698
2015-02-26 22:38:34 +00:00
Nico Weber ff62a6a0b7 Don't crash on leaving nested __finally blocks through an EH edge.
The __finally emission block tries to be clever by removing unused continuation
edges if there's an unconditional jump out of the __finally block. With
exception edges, the EH continuation edge isn't always unused though and we'd
crash in a few places.

Just don't be clever. That makes the IR for __finally blocks a bit longer in
some cases (hence small and behavior-preserving changes to existing tests), but
it makes no difference in general and it fixes the last crash from PR22553.

http://reviews.llvm.org/D7918

llvm-svn: 230697
2015-02-26 22:34:33 +00:00
Chandler Carruth 653773d004 [x86] Fix PR22706 where we would incorrectly try lower a v32i8 dynamic
blend as legal.

We made the same mistake in two different places. Whenever we are custom
lowering a v32i8 blend we need to check whether we are custom lowering
it only for constant conditions that can be shuffled, or whether we
actually have AVX2 and full dynamic blending support on bytes. Both are
fixed, with comments added to make it clear what is going on and a new
test case.

llvm-svn: 230695
2015-02-26 22:15:34 +00:00
Chaoren Lin b6cd5fe918 Fix Bug 20400
Summary:
http://llvm.org/bugs/show_bug.cgi?id=20400

The default triple of i686-pc-linux-gnu for 32 bit linux targets is compatible
but not necessarily identical to the inferior binaries.

Applying Azat Khuzhin's solution of using ArchSpec::IsCompatibleMatch() instead
of ArchSpec::IsExactMatch() when comparing ObjectFile and Modules architecture.

Reviewers: vharron

Subscribers: lldb-commits

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

llvm-svn: 230694
2015-02-26 22:15:16 +00:00
Rafael Espindola e8fd00dab0 Simplify arange output.
Move SectionMap to its only user (emitDebugARanges) and
reorder to save a call to sort.

llvm-svn: 230693
2015-02-26 22:02:02 +00:00
Reid Kleckner f3c8209c77 Re-instate the pragma optimize hack for MSVC, but not clang-cl
Reverts commit r230686 with define modifications.

llvm-svn: 230692
2015-02-26 21:34:11 +00:00
Chaoren Lin 3011680752 Add synchronization to TestWatchLocation.
Summary:
There was no guarantee that the three threads haven't already exited by the
time the watchpoint is set.

Reviewers: ovyalov

Subscribers: lldb-commits

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

llvm-svn: 230691
2015-02-26 21:31:27 +00:00
Chandler Carruth 7bd840d058 [x86] Restructure the comments and the conditions for handling
dynamic blends.

This makes it much more clear what is going on. The case we're handling
is that of dynamic conditions, and we're bailing when the nature of the
vector types and subtarget preclude lowering the dynamic condition
vselect as an actual blend.

No functionality changed here, but this will make a subsequent bug-fix
to this code much more clear.

llvm-svn: 230690
2015-02-26 21:29:06 +00:00
Chandler Carruth efc6819041 [x86] Re-order the combines of select in the X86 backend. This doesn't
change functionality, but makes it more clear that the dynamic case and
the shuffle case don't overlap in any interesting way.

llvm-svn: 230689
2015-02-26 21:21:36 +00:00
Chandler Carruth 0757f14c69 [x86] Add an assert to catch if we ever try to blend a v32i8 without
AVX2.

llvm-svn: 230688
2015-02-26 21:18:20 +00:00
Reid Kleckner 48e04e492f Give enum an unsigned type to silence -Wmicrosoft clang-cl warning
llvm-svn: 230687
2015-02-26 21:10:01 +00:00
Reid Kleckner 94ce865c81 Remove stale pragma hack for an unsupported MSVC version
llvm-svn: 230686
2015-02-26 21:08:27 +00:00
Reid Kleckner 542a45435f Silence some Win64 clang-cl warnings about unused stuff due to ifdefs
llvm-svn: 230685
2015-02-26 21:08:21 +00:00
Reid Kleckner 1aecd5b8d9 Use wider type for overflow check on LLP64 platforms like Win64, found by clang-cl -Wtautological
llvm-svn: 230684
2015-02-26 21:07:30 +00:00
Alexey Samsonov a716618927 [CMake] Make sure we built one variant of i386/i686 runtime libraries.
llvm-svn: 230683
2015-02-26 21:03:41 +00:00
Nico Weber 6307cf0aa3 Wrap to 80 columns. No behavior change.
llvm-svn: 230682
2015-02-26 20:43:00 +00:00
Reid Kleckner 3c6963b806 Add myself as a code owner for Microsoft C++ ABI code and general Windows support
Reviewers: rsmith

Subscribers: cfe-commits

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

llvm-svn: 230681
2015-02-26 20:37:49 +00:00