Check to see if the 'no-builtin' attribute is set before simplifying a library call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175470 91177308-0d34-0410-b5e6-96231b3b80d8
Use array_pod_sort instead of std::sort.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175472 91177308-0d34-0410-b5e6-96231b3b80d8
Expand pseudos BteqzT8CmpiX16 and BtnezT8CmpiX16.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175474 91177308-0d34-0410-b5e6-96231b3b80d8
Temporarily revert r175470 for more review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175476 91177308-0d34-0410-b5e6-96231b3b80d8
Remove some unused private fields from the AArch64MCCodeEmitter. These
fields were only ever set in the constructor. The create method retains
its consistent interface so that these bits can be re-threaded through
the emitter if they're ever needed.

This was found by the -Wunused-private-field Clang warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175482 91177308-0d34-0410-b5e6-96231b3b80d8
Use a reference into the BlockLiveness DenseMap to avoid repeated hash lookups in collectMarkers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175484 91177308-0d34-0410-b5e6-96231b3b80d8
Make the dump() function const and reduce the number of hash lookups it performs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175485 91177308-0d34-0410-b5e6-96231b3b80d8
Expand pseudos/macros BteqzT8SltiX16, BteqzT8SltiuX16,
BtnezT8SltiX16, BtnezT8SltiuX16 .



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175486 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid extra DenseMap lookups in StackColoring::calculateLocalLiveness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175487 91177308-0d34-0410-b5e6-96231b3b80d8
Const-correct the stack coloring code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175488 91177308-0d34-0410-b5e6-96231b3b80d8
More const correcting of stack coloring.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175493 91177308-0d34-0410-b5e6-96231b3b80d8
Fix capitalization in comment to match function name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175497 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify code. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175501 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] instrument memory accesses with unusual sizes

This patch makes asan instrument memory accesses with unusual sizes (e.g. 5 bytes or 10 bytes), e.g. long double or
packed structures.
Instrumentation is done with two 1-byte checks
(first and last bytes) and if the error is found
__asan_report_load_n(addr, real_size) or
__asan_report_store_n(addr, real_size)
is called.

Also, call these two new functions in memset/memcpy
instrumentation.

asan-rt part will follow.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175507 91177308-0d34-0410-b5e6-96231b3b80d8
Fix initialization-order bug in llvm::Support::TimeValue. TimeValue::now() is explicitly called during module initialization of lib/Support/Process.cpp. It reads the field of global object PosixZeroTime, which is not guaranteed to be initialized at this point. Found by AddressSanitizer with -fsanitize=init-order option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175509 91177308-0d34-0410-b5e6-96231b3b80d8
R600: Fix tracking of implicit defs in the IndirectAddressing pass

In some cases, we were losing track of live implicit registers which
was creating dead defs and causing the scheduler to produce invalid
code.

NOTE: This is a candidate for the Mesa stable branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175516 91177308-0d34-0410-b5e6-96231b3b80d8
R600: Fix scheduler crash caused by invalid MachinePointerInfo

Kernel function arguments are lowered to loads from the PARAM_I address
space.  When creating these load instructions, we were initializing
their MachinePointerInfo with an Arguement object that was not attached
to any function.  This was causing the MachineScheduler to crash when
it tried to access the parent of the Arguement.

This has been fixed by initializing the MachinePointerInfo with a
UndefValue instead.

NOTE: This is a candidate for the Mesa stable branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175517 91177308-0d34-0410-b5e6-96231b3b80d8
R600: Mark all members of the TRegMem register class as reserved

This stops the Machine Verifier from complaining about uses of undefined
physical registers.

NOTE: This is a candidate for the Mesa stable branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175518 91177308-0d34-0410-b5e6-96231b3b80d8
R600: Add AR_X to the R600_TReg_X register class.

NOTE: This is a candidate for the Mesa stable branch.

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