Lit: Introduce "%/[STpst] into parseIntegratedTestScript(), to normalize substitutions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188348 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] add_llvm_library: Specify explicit suffix .imp to import library to avoid a warning between profile_rt-static and profile_rt-shared with lib/profile_rt.lib.

FIXME: It seems MS version of profile_rt.dll doesn't contain any export symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188351 91177308-0d34-0410-b5e6-96231b3b80d8
[lit] Move formats into their own subpackage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188355 91177308-0d34-0410-b5e6-96231b3b80d8
[lit] Move executeCommand() into lit.util.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188356 91177308-0d34-0410-b5e6-96231b3b80d8
[lit] Factor ShTest format script command parsing from other processing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188357 91177308-0d34-0410-b5e6-96231b3b80d8
[lit] Fix tests to execute lit with same python as invoked with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188358 91177308-0d34-0410-b5e6-96231b3b80d8
[lit] Avoid StringIO.
 - We barely used it, and it is very hard to use in a 2.5-3 compatible
   way because of changing expectations for its input types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188359 91177308-0d34-0410-b5e6-96231b3b80d8
[lit] Fix a relative import issue I missed earlier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188360 91177308-0d34-0410-b5e6-96231b3b80d8
Replace EVT with MVT in many of the shuffle lowering functions. Keeps compiler from generating unneeded checks and handling for extended types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188361 91177308-0d34-0410-b5e6-96231b3b80d8
Replace EVT with MVT in isVectorShift. Keeps compiler from generating unneeded checks and handling for extended types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188362 91177308-0d34-0410-b5e6-96231b3b80d8
Use MVT in more lowering code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188363 91177308-0d34-0410-b5e6-96231b3b80d8
Make some helper methods static.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188365 91177308-0d34-0410-b5e6-96231b3b80d8
Make more helper methods into static functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188366 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a really terrifying but improbable bug in mem2reg. If you have seen
extremely subtle miscompilations (such as a load getting replaced with
the value stored *below* the load within a basic block) related to
promoting an alloca to an SSA value, there is the dim possibility that
you hit this. Please let me know if you won this unfortunate lottery.

The first half of mem2reg's core logic (as it is used both in the
standalone mem2reg pass and in SROA) builds up a mapping from
'Instruction *' to the index of that instruction within its basic block.
This allows quickly establishing which store dominate a particular load
even for large basic blocks. We cache this information throughout the
run of mem2reg over a function in order to amortize the cost of
computing it.

This is not in and of itself a strange pattern in LLVM. However, it
introduces a very important constraint: absolutely no instruction can be
deleted from the program without updating the mapping. Otherwise a newly
allocated instruction might get the same pointer address, and then end
up with a wrong index. Yes, LLVM routinely suffers from a *single
threaded* variant of the ABA problem. Most places in LLVM don't find
avoiding this an imposition because they don't both delete and create
new instructions iteratively, but mem2reg *loves* to do this... All the
time. Fortunately, the mem2reg code was really careful about updating
this cache to handle this eventuallity... except when it comes to the
debug declare intrinsic. Oops. The fix is to invalidate that pointer in
the cache when we delete it, the same as we do when deleting alloca
instructions and other instructions.

I've also caused the same bug in new code while working on a fix to
PR16867, so this seems to be a really unfortunate pattern. Hopefully in
subsequent patches the deletion of dead instructions can be consolidated
sufficiently to make it less likely that we'll see future occurences of
this bug.

Sorry for not having a test case, but I have literally no idea how to
reliably trigger this kind of thing. It may be single-threaded, but it
remains an ABA problem. It would require a really amazing number of
stars to align.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188367 91177308-0d34-0410-b5e6-96231b3b80d8
Support C99 hexadecimal floating-point literals in assembly

It's useful to be able to write down floating-point numbers without having to
worry about what they'll be rounded to (as C99 discovered), this extends that
ability to the MC assembly parsers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188370 91177308-0d34-0410-b5e6-96231b3b80d8
Add test-case for hex floating-literals

Somehow I forgot to test one of the error conditions I'd added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188372 91177308-0d34-0410-b5e6-96231b3b80d8
[lit] Support parsing scripts with inconsistent or invalid encodings.

 - For whatever reason, we have a lot of test files with bogus unicode
   characters. This patch allows those scripts to still be parsed on Python3 by
   changing the parsing logic to work on binary files, and only require the
   actual script commands to be convertible to ascii.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188376 91177308-0d34-0410-b5e6-96231b3b80d8
Add the C99 hex-float assembly syntax to our extension document.

As Ben pointed out, GAS doesn't support this syntax so we should give at least
some warning that it might not be portable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188377 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r188376, "[lit] Support parsing scripts with inconsistent or invalid encodings.", this doesn't work yet for bots using the internal shell.

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