Commit Graph

145518 Commits

Author SHA1 Message Date
Anton Korobeynikov 2810a0ab80 Windows TLS: Section name prefix to ensure correct order
The linker sorts the .tls$<xyz> sections by name, and we need
to make sure any extra sections we produce (e.g. for weak globals) 
always end up between .tls$AAA and .tls$ZZZ, even if the name 
starts with e.g. an underscore.

Patch by David Nadlinger!

llvm-svn: 177256
2013-03-18 08:10:10 +00:00
Dmitry Vyukov 6f7ca81cce tsan: fix huge stack frames
llvm-svn: 177255
2013-03-18 08:09:42 +00:00
Kostya Serebryany bd016bb614 [asan] while generating the description of a global variable, emit the module name in a separate field, thus not duplicating this information if every description. This decreases the binary size (observed up to 3%). https://code.google.com/p/address-sanitizer/issues/detail?id=168 . This changes the asan API version. llvm-part
llvm-svn: 177254
2013-03-18 08:05:29 +00:00
Kostya Serebryany c4722a65a5 [asan] while generating the description of a global variable, emit the module name in a separate field, thus not duplicating this information if every description. This decreases the binary size (observed up to 3%). https://code.google.com/p/address-sanitizer/issues/detail?id=168 . This changes the asan API version. compiler-rt part, llvm-part will follow
llvm-svn: 177253
2013-03-18 08:04:55 +00:00
Anton Korobeynikov 2bed8472d1 Make sure to use same EABI version for external assembler as for integrated as.
Patch by Andrew Turner!

llvm-svn: 177252
2013-03-18 07:59:20 +00:00
Dmitry Vyukov 0f2c7ea5d0 tsan: fix lint warnings
llvm-svn: 177251
2013-03-18 07:58:20 +00:00
Kostya Serebryany 6b5b58deeb [asan] don't instrument functions with available_externally linkage. This saves a bit of compile time and reduces the number of redundant global strings generated by asan (https://code.google.com/p/address-sanitizer/issues/detail?id=167)
llvm-svn: 177250
2013-03-18 07:33:49 +00:00
Alexey Samsonov cbed82ea70 [TSan] fix undefined variable in debug TSan build
llvm-svn: 177249
2013-03-18 07:33:00 +00:00
Alexey Samsonov 4f1c8a13d5 [TSan] Use ThreadRegistry::FindThreadContextLocked() to find thread by its stack/tls address.
llvm-svn: 177248
2013-03-18 07:02:08 +00:00
Alexey Samsonov e1955b851d [TSan] Makefiles: allow configurable paths to clang and FileCheck. Add -fno-rtti flag.
llvm-svn: 177247
2013-03-18 07:00:36 +00:00
Alexey Samsonov f9dbbda5bc [Sanitizer] Get rid of global mutexes in StopTheWorld implementation
llvm-svn: 177246
2013-03-18 06:27:13 +00:00
Alexey Samsonov e25c72958a [Sanitizer] Rely on template argument deduction in sanitizer_allocator_test
llvm-svn: 177245
2013-03-18 06:07:44 +00:00
Jakob Stoklund Olesen 57a865089a Extract a method.
This computes the type of an instruction operand or result based on the
records in the instruction's ins and outs lists.

llvm-svn: 177244
2013-03-18 04:08:07 +00:00
Craig Topper 0498b88d48 Post process ADC/SBB and use a shorter encoding if they use a sign extended immediate.
llvm-svn: 177243
2013-03-18 03:34:55 +00:00
Craig Topper 7e9a1cb199 Refactor some duplicated code into helper functions.
llvm-svn: 177242
2013-03-18 02:53:34 +00:00
David Blaikie 5f78b37abe Fix the build broken in r177239
Seems some accidental C++11 crept in there. Reported by the C++98 buildbots.

llvm-svn: 177241
2013-03-17 21:32:54 +00:00
Michael Gottesman a8b60a4fda Reduced dont-infinite-loop-during-block-escape-analysis.ll with bugpoint and moved it to retain-block-escape-analysis.ll.
*NOTE* I verified that the original bug behind
dont-infinite-loop-during-block-escape-analysis.ll occurs when using opt on
retain-block-escape-analysis.ll.

llvm-svn: 177240
2013-03-17 21:31:12 +00:00
David Blaikie 8fb8224578 Split out filename & directory from DIFile to start generalizing over DIScopes
This is the first step to making all DIScopes have a common metadata prefix (so
that things (using directives, for example) that can appear in any scope can be
added to that common prefix). DIFile is itself a DIScope so the common prefix
of all DIScopes cannot be a DIFile - instead it's the raw filename/directory
name pair.

llvm-svn: 177239
2013-03-17 21:13:55 +00:00
David Blaikie 2e488d1f0d Generalize debug info test to be resilient to changes in metadata node numbering
llvm-svn: 177238
2013-03-17 21:08:22 +00:00
David Blaikie aadd944850 Generalize a few debug info test cases
Checking for the annotation comment rather than the metadata values makes these
tests resilient to a coming refactor that will pull these fields out into a
separate metadata node.

llvm-svn: 177237
2013-03-17 20:29:22 +00:00
David Blaikie 08fb5457aa Improve DIFile debug info annotation by letting it fallback to DIScope
llvm-svn: 177236
2013-03-17 20:28:12 +00:00
Jakob Stoklund Olesen 13d4a07fa9 Use ArrayRef<MVT::SimpleValueType> when possible.
Not passing vector references around makes it possible to use
SmallVector in most places.

llvm-svn: 177235
2013-03-17 17:26:09 +00:00
Sylvestre Ledru 37ef20d307 To avoid symbol clash, undefine PPC here. PPC may be predefined on some hosts.
llvm-svn: 177234
2013-03-17 12:40:42 +00:00
Rafael Espindola bd5bd89e77 Build LLVMgold.so on FreeBSD using cmake.
Patch by Stephen Checkoway.

llvm-svn: 177233
2013-03-17 12:01:05 +00:00
Michael Gottesman 9782183126 The promised test case for r175939.
This test makes sure that the ObjCARC escape analysis looks at the uses of
instructions which copy the block pointer value by checking all four cases where
that can occur.

llvm-svn: 177232
2013-03-17 08:42:58 +00:00
Hal Finkel fcc51d4ff1 Improve PPC VR (Altivec) register spilling
This change cleans up two issues with Altivec register spilling:

  1. The spilling code was inefficient (using two instructions, and add and a
     load, when just one would do)

  2. The code assumed that r0 would always be available (true for now, but this
     will change)

The new code handles VR spilling just like GPR spills but forced into r+r mode.
As a result, when any VR spills are present, we must now always allocate the
register-scavenger spill slot.

llvm-svn: 177231
2013-03-17 04:43:44 +00:00
Hal Finkel 57080382e6 Remove FIXMEs in PPC test cases related to unaligned loads/stores
As pointed out by Bill in response to r177160, these two FIXMEs
can also be removed.

llvm-svn: 177229
2013-03-16 23:02:31 +00:00
Hal Finkel 8b0470393b Remove PPC avoidWriteAfterWrite callback
As a follow-up to r158719, remove PPCRegisterInfo::avoidWriteAfterWrite.
Jakob pointed out in response to r158719 that this callback is currently unused
and so this has no effect (and the speedups that I thought that I had observed
as a result of implementing this function must have been noise).

llvm-svn: 177228
2013-03-16 22:50:51 +00:00
Andrew Trick 6057017c68 Change the default latency for implicit defs.
Implicit defs are not currently positional and not modeled by the
per-operand machine model. Unfortunately, we treat defs that are part
of the architectural instruction description, like flags, the same as
other implicit defs. Really, they should have a fixed MachineInstr
layout and probably shouldn't be "implicit" at all.

For now, we'll change the default latency to be the max operand
latency. That will give flag setting operands full latency for x86
folded loads. Other kinds of "fake" implicit defs don't occur prior to
regalloc anyway, and we would like them to go away postRegAlloc as
well.

llvm-svn: 177227
2013-03-16 18:58:57 +00:00
Andrew Trick bf8a28dc52 Machine model. Allow mixed itinerary classes and SchedRW lists.
We always supported a mixture of the old itinerary model and new
per-operand model, but it required a level of indirection to map
itinerary classes to SchedRW lists. This was done for ARM A9.

Now we want to define x86 SchedRW lists, with the goal of removing its
itinerary classes, but still support the itineraries in the mean
time. When I original developed the model, Atom did not have
itineraries, so there was no reason to expect this requirement.

llvm-svn: 177226
2013-03-16 18:58:55 +00:00
Sylvestre Ledru 6d88a690e6 When built with cmake, only call the string functions when the previous commands (utils/GetSourceVersion & utils/GetRepositoryPath successed). Otherwise, they fail when not launched from a repository
llvm-svn: 177225
2013-03-16 17:01:13 +00:00
Sean Silva ca11d2c7ff [docs] Discuss a potential bug to be aware of.
llvm-svn: 177224
2013-03-16 16:58:20 +00:00
Aaron Ballman fcdf9a8240 Test case for graceful handling of long file names on Windows. Patch thanks to Paul Robinson!
llvm-svn: 177223
2013-03-16 15:00:51 +00:00
Manman Ren c089074aa5 revert r177211 due to its potential issues
llvm-svn: 177222
2013-03-16 04:47:38 +00:00
Craig Topper 612f7bfa4d Add X86 code emitter support AVX encoded MRMDestReg instructions.
Previously we weren't skipping the VVVV encoded register. Based on patch by Michael Liao.

llvm-svn: 177221
2013-03-16 03:44:31 +00:00
Jordan Rose 3d7b7f5268 [analyzer] Model trivial copy/move assignment operators with a bind as well.
r175234 allowed the analyzer to model trivial copy/move constructors as
an aggregate bind. This commit extends that to trivial assignment
operators as well. Like the last commit, one of the motivating factors here
is not warning when the right-hand object is partially-initialized, which
can have legitimate uses.

<rdar://problem/13405162>

llvm-svn: 177220
2013-03-16 02:14:06 +00:00
Enrico Granata 9f71ad4fa8 C++ formatters for NSTimeZone and for CFBitVector
llvm-svn: 177219
2013-03-16 01:50:07 +00:00
Argyrios Kyrtzidis 3065a0fce4 Remove -Wspellcheck and replace it with a diagnostic option.
Thanks to Richard S. for pointing out that the warning would show up
with -Weverything.

llvm-svn: 177218
2013-03-16 01:40:35 +00:00
Enrico Granata 6a92511a08 NS(Mutable)IndexSet formatter moves from Python to C++
llvm-svn: 177217
2013-03-16 01:18:00 +00:00
Jordan Rose 7a007bfbad [analyzer] Separate graph trimming from creating the single-path graph.
When we generate a path diagnostic for a bug report, we have to take the
full ExplodedGraph and limit it down to a single path. We do this in two
steps: "trimming", which limits the graph to all the paths that lead to
this particular bug, and "creating the report graph", which finds the
shortest path in the trimmed path to any error node.

With BugReporterVisitor false positive suppression, this becomes more
expensive: it's possible for some paths through the trimmed graph to be
invalid (i.e. likely false positives) but others to be valid. Therefore
we have to run the visitors over each path in the graph until we find one
that is valid, or until we've ruled them all out. This can become quite
expensive.

This commit separates out graph trimming from creating the report graph,
performing the first only once per bug equivalence class and the second
once per bug report. It also cleans up that portion of the code by
introducing some wrapper classes.

This seems to recover most of the performance regression described in my
last commit.

<rdar://problem/13433687>

llvm-svn: 177216
2013-03-16 01:07:58 +00:00
Jordan Rose 0833c84a50 [analyzer] Eliminate InterExplodedGraphMap class and NodeBackMap typedef.
...in favor of this typedef:

  typedef llvm::DenseMap<const ExplodedNode *, const ExplodedNode *>
          InterExplodedGraphMap;

Use this everywhere the previous class and typedef were used.

Took the opportunity to ArrayRef-ize ExplodedGraph::trim while I'm at it.

No functionality change.

llvm-svn: 177215
2013-03-16 01:07:53 +00:00
Jordan Rose 5315931105 [analyzer] Don't repeat a bug equivalence class if every report is invalid.
I removed this check in the recursion->iteration commit, but forgot that
generatePathDiagnostic may be called multiple times if there are multiple
PathDiagnosticConsumers.

llvm-svn: 177214
2013-03-16 01:07:47 +00:00
Enrico Granata 50b5ee5023 Converting more data formatters to C++ - NSBundle, CFBinaryHeap, NSMachPort and NSNotification
llvm-svn: 177213
2013-03-16 00:50:25 +00:00
Howard Hinnant 5efca64dd9 This should be nothing but a load-time optimization. I'm trying to reduce load time initializers and this is a big one. No visible functionality change intended.
llvm-svn: 177212
2013-03-16 00:17:53 +00:00
Manman Ren 58dd990c11 Exploit this-return of a callsite in a this-return function.
For constructors/desctructors that return 'this', if there exists a callsite
that returns 'this' and is immediately before the return instruction, make
sure we are using the return value from the callsite.

We don't need to keep 'this' alive through the callsite. It also enables
optimizations in the backend, such as tail call optimization.

rdar://12818789

llvm-svn: 177211
2013-03-16 00:11:09 +00:00
Jakob Stoklund Olesen 63bff2eb39 Define more SchedWrites for annotating X86 instructions.
Since almost all X86 instructions can fold loads, use a multiclass to
define register/memory pairs of SchedWrites.

An X86FoldableSchedWrite represents the register version of an
instruction. It holds a reference to the SchedWrite to use when the
instruction folds a load.

This will be used inside multiclasses that define rr and rm instruction
versions together.

llvm-svn: 177210
2013-03-16 00:02:17 +00:00
Richard Trieu 64ab30392d Improve template diffing handling of default integer values.
When the template argument is both default and value dependent, the expression
retrieved for the default argument cannot be evaluated, thus never matching
any argument value.  To get the proper value, get the template argument
from the desugared template specialization.  Also, output the original
expression to provide more information about the argument mismatch.

llvm-svn: 177209
2013-03-15 23:55:09 +00:00
Greg Clayton 6482d2305e <rdar://problem/13194155>
Variables view out of sync with lldb in Xcode is now fixed. Depending on what happened stack frames could get out of date and a stale shared pointer (one that is no longer a current frame in a thread) could end up being used. 

Now we don't store a weak_ptr to a frame in the ExecutionContextRef class, we just store its stack ID and we always regrab the frame from the thread by stack ID.

llvm-svn: 177208
2013-03-15 23:54:07 +00:00
Anna Zaks 0e4513b030 [analyzer] Address a TODO in the StreamChecker; otherwise the output is non-deterministic.
llvm-svn: 177207
2013-03-15 23:34:31 +00:00
Anna Zaks bda130f02a [analyzer] Use isLiveRegion to determine when SymbolRegionValue is dead.
Fixes a FIXME, improves dead symbol collection, suppresses a false positive,
which resulted from reusing the same symbol twice for simulation of 2 calls to the same function.

Fixing this lead to 2 possible false negatives in CString checker. Since the checker is still alpha and
the solution will not require revert of this commit, move the tests to a FIXME section.

llvm-svn: 177206
2013-03-15 23:34:29 +00:00