Correct partially defined variable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189705 91177308-0d34-0410-b5e6-96231b3b80d8
[PowerPC] Add integer truncation support to fast-isel.

This is the last substantive patch I'm planning for fast-isel in the
near future, adding fast selection of integer truncates.  There are
certainly more things that can be improved (many of which are called
out in FIXMEs), but for now we are catching most of the important
cases.

I'll document some of the remaining work in a cleanup patch shortly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189706 91177308-0d34-0410-b5e6-96231b3b80d8
[PowerPC] Fast-isel cleanup patch.

Here are a few miscellaneous things to tidy up the PPC64 fast-isel
implementation.  I corrected a couple of commentary lapses, and added
documentation of future opportunities.  I also implemented
TargetMaterializeAlloca, which I somehow forgot when I split up the
original huge patch.

Finally, I decided to delete SelectCmp.  I hadn't previously hooked it
in to TargetSelectInstruction(), and when I did I realized it wasn't
serving any useful purpose.  This is only useful for compares that
don't feed a branch in the same block, and to handle that we would
have to have logic to interpret i1 as a condition register.  This
could probably be done, but would require Unseemly Hackery, and
honestly does not seem worth the hassle.

This ends the current patch series.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189715 91177308-0d34-0410-b5e6-96231b3b80d8
Fix my previous checkin to updatePressureDiffs.

There was one case that we could hit a DebugValue where I didn't think
to check. DebugValues are evil. No checkinable test case, sorry. It's
an obvious fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189717 91177308-0d34-0410-b5e6-96231b3b80d8
SimplifyLibCalls: When emitting an overloaded fp function check that it's available.

The existing code missed some edge cases when e.g. we're going to emit sqrtf but
only the availability of sqrt was checked. This happens on odd platforms like
windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189724 91177308-0d34-0410-b5e6-96231b3b80d8
Free PressureDiffs instead of leaking.

Found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189725 91177308-0d34-0410-b5e6-96231b3b80d8
Mark an unreachable code path with llvm_unreachable. Pacifies GCC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189726 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure we don't generate stubs for any of these functions because they
don't exist in libc. This is really not the right way to solve this problem;
but it's not clear to me at this time exactly what is the right way.
If we create stubs here, they will cause link errors because these functions
do not exist in libc.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189727 91177308-0d34-0410-b5e6-96231b3b80d8
Move everything depending on Object/MachOFormat.h over to Support/MachO.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189728 91177308-0d34-0410-b5e6-96231b3b80d8
AVX-512: Added GATHER and SCATTER instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189729 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r189704, which removed the guidance about not duplicating doc comments.
This is under active discussion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189730 91177308-0d34-0410-b5e6-96231b3b80d8
Nuke the hilariously out of date suggestion to unpack llvm-gcc 4.2 as
part of getting started with LLVM.

The LLVM getting started document is in woeful need of attention. I may
get to some of this, but some random notes for folks interested:

1) We need to separate the getting started steps for folks who are
   interested in the core LLVM libs and nothing else, folks interested
   in a nifty C++ toolchain and nothing else, and folks interested in
   both.
2) We should include documentation for both release archives, svn, and
   git in equal portion, and we should document all of the various
   repositories of interest: llvm, clang, clang-tools-extra,
   compiler-rt, lld, libcxx, test-suite.
3) We should document the CMake build. We should probably document the
   CMake build first, and give a fall-back set of docs for the Makefile
   build for the use cases where that is still the preferred solution.
   This would more closely match the use cases that folks in the open
   source community are likely to have, and would remove a point of
   discrepancy between Linux, Windows, and Mac instructions.
4) Probably a ton of other modernization stuff that I've not thought of
   here.

Anyways, if anyone at all is interested, please help clean up this
document. It is much needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189732 91177308-0d34-0410-b5e6-96231b3b80d8
Added std:: qualifier to find() invocation

Iterator of std::vector may be implemented as a raw pointer. In
this case ADL does not find the find() function in the std namespace.
For example, this is the case with STDCXX implementation of vector.

Patch by Konstantin Tokarev.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189733 91177308-0d34-0410-b5e6-96231b3b80d8
Fix some rather confusing indentation and control flow in the errno
printing routine. This is made harder to see due to the surprising
formatting, inconsistent brace usage, and repeated conditions that all
test the same thing.

The only "consequence" of this bug is re-assigning 'str' to an empty
string when computing the error string for an error number of 0 in the
event of a non-GNU strerror_r routine. So, nothing to see here other
than cleanup. It did help me find PR17055 in clang-format though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189734 91177308-0d34-0410-b5e6-96231b3b80d8
llvm interpreter: select, shuffle and insertelement instructions.
This patch implements vector support for  select instruction and adds specific vector instructions : shuffle and insertelement. (tests are also included)
and functions lle_X_memset, lle_X_memcpy added.

Done by Veselov, Yuri (mailto:Yuri.Veselov@intel.com)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189735 91177308-0d34-0410-b5e6-96231b3b80d8
AVX-512: gather-scatter tests; added foldable instructions;
Specify GATHER/SCATTER as heavy instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189736 91177308-0d34-0410-b5e6-96231b3b80d8
Add a clang-format file so that the tool can automatically detect the
correct style for the LLVM tree as well as projects checked out under
projects and tools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189737 91177308-0d34-0410-b5e6-96231b3b80d8
AVX-512: updated the list of high-latency instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189740 91177308-0d34-0410-b5e6-96231b3b80d8
Create BEXTR instructions for (and ((sra or srl) x, imm), (2**size - 1)). Fixes PR17028.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189742 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Add -O1 in debug builds with LLVM_USE_SANITIZER

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