The archive update test has a subtle race condition in it: if the test
is executed within the same second as the inputs for the test are
checked out from the source tree, it will fail to update due to being
below the resolution of the 'mtime' test used.

Now, this may seem improbably to you... ok, maybe *really* improbable,
but consider a system which does distributed execution of tests by
shipping their inputs to another machine and runs them. That might cause
the mtime to be quite recent during the test run. ;]

Instead, create two files directly in the test (allowing all platforms
to see the problem) and add either a use of the 'touch' command that
forces one mtime to some time quite a bit in the past, or it sleeps for
just over a second to be outside of the precision window.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186282 91177308-0d34-0410-b5e6-96231b3b80d8
Properly lower jump tables on MSP430. Patch by Job Noorman!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186283 91177308-0d34-0410-b5e6-96231b3b80d8
Correct inaccurate statement in FileCheck docs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186290 91177308-0d34-0410-b5e6-96231b3b80d8
Use conventional syntax for branches.
Patch by Job!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186291 91177308-0d34-0410-b5e6-96231b3b80d8
Collapse temporary variable into call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186295 91177308-0d34-0410-b5e6-96231b3b80d8
Add DW_AT_GNU_odr_signature to the set of dwarf attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186296 91177308-0d34-0410-b5e6-96231b3b80d8
Clarify comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186297 91177308-0d34-0410-b5e6-96231b3b80d8
Mark llvm/test/Object/extract.ll as XFAIL:mingw32, for now.

FIXME: Investigate Win32's TimeValue stuff!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186298 91177308-0d34-0410-b5e6-96231b3b80d8
Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186301 91177308-0d34-0410-b5e6-96231b3b80d8
Revert part of 186302 to fix buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186303 91177308-0d34-0410-b5e6-96231b3b80d8
Make some arrays 'static const'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186307 91177308-0d34-0410-b5e6-96231b3b80d8
Add 'static' keyword to some const arrays for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186308 91177308-0d34-0410-b5e6-96231b3b80d8
Add const qualifier to some static arrays.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186309 91177308-0d34-0410-b5e6-96231b3b80d8
Add include to hopefully fix windows build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186310 91177308-0d34-0410-b5e6-96231b3b80d8
Make some arrays 'static const'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186311 91177308-0d34-0410-b5e6-96231b3b80d8
Add 'const' qualifier to some arrays.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186312 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: Factor out parsing compile unit DIEs to a separate function. Improve code style and comments.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186315 91177308-0d34-0410-b5e6-96231b3b80d8
Reimplement SROA yet again. Same fundamental principle, but a totally
different core implementation strategy.

Previously, SROA would build a relatively elaborate partitioning of an
alloca, associate uses with each partition, and then rewrite the uses of
each partition in an attempt to break apart the alloca into chunks that
could be promoted. This was very wasteful in terms of memory and compile
time because regardless of how complex the alloca or how much we're able
to do in breaking it up, all of the datastructure work to analyze the
partitioning was done up front.

The new implementation attempts to form partitions of the alloca lazily
and on the fly, rewriting the uses that make up that partition as it
goes. This has a few significant effects:
1) Much simpler data structures are used throughout.
2) No more double walk of the recursive use graph of the alloca, only
   walk it once.
3) No more complex algorithms for associating a particular use with
   a particular partition.
4) PHI and Select speculation is simplified and happens lazily.
5) More precise information is available about a specific use of the
   alloca, removing the need for some side datastructures.

Ultimately, I think this is a much better implementation. It removes
about 300 lines of code, but arguably removes more like 500 considering
that some code grew in the process of being factored apart and cleaned
up for this all to work.

I've re-used as much of the old implementation as possible, which
includes the lion's share of code in the form of the rewriting logic.
The interesting new logic centers around how the uses of a partition are
sorted, and split into actual partitions.

Each instruction using a pointer derived from the alloca gets
a 'Partition' entry. This name is totally wrong, but I'll do a rename in
a follow-up commit as there is already enough churn here. The entry
describes the offset range accessed and the nature of the access. Once
we have all of these entries we sort them in a very specific way:
increasing order of begin offset, followed by whether they are
splittable uses (memcpy, etc), followed by the end offset or whatever.
Sorting by splittability is important as it simplifies the collection of
uses into a partition.

Once we have these uses sorted, we walk from the beginning to the end
building up a range of uses that form a partition of the alloca.
Overlapping unsplittable uses are merged into a single partition while
splittable uses are broken apart and carried from one partition to the
next. A partition is also introduced to bridge splittable uses between
the unsplittable regions when necessary.

I've looked at the performance PRs fairly closely. PR15471 no longer
will even load (the module is invalid). Not sure what is up there.
PR15412 improves by between 5% and 10%, however it is nearly impossible
to know what is holding it up as SROA (the entire pass) takes less time
than reading the IR for that test case. The analysis takes the same time
as running mem2reg on the final allocas. I suspect (without much
evidence) that the new implementation will scale much better however,
and it is just the small nature of the test cases that makes the changes
small and noisy. Either way, it is still simpler and cleaner I think.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186316 91177308-0d34-0410-b5e6-96231b3b80d8
XFAIL this on freebsd to bring the bot back.

Joerg Sonnenberger tells me one can open a directory in freebsd. I will try
to centralize our calls to open so that we can handle O_BINARY in one place,
and will then handle this there too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186317 91177308-0d34-0410-b5e6-96231b3b80d8
[Option] Store arg strings in a set backed by a BumpPtrAllocator

No functionality change.

This is preparing to move response file parsing into lib/Option so it
can be shared between clang and lld.  This change isn't just a
micro-optimization.  Clang's driver uses a std::set<std::string> to
unique arguments while parsing response files, so this matches that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186319 91177308-0d34-0410-b5e6-96231b3b80d8