Commit Graph

105637 Commits

Author SHA1 Message Date
Simon Atanasyan
b2b56ed1a6 [Mips] Support SHT_MIPS_ABIFLAGS section type flag in the llvm-readobj,
obj2yaml and yaml2obj tools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212908 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-13 15:28:54 +00:00
NAKAMURA Takumi
d74d9b3377 [CMake] Enable loadable modules, aka plugins, with BUILD_SHARED_LIBS on cygming.
Loadable modules could be enabled without BUILD_SHARED_LIBS with tweaks in future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212907 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-13 13:47:37 +00:00
NAKAMURA Takumi
4a8dd7ced6 [CMake] Add LLVM_LINK_COMPONENTS to loadable modules, LLVMHello and BugpointPasses, on Win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212904 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-13 13:36:48 +00:00
NAKAMURA Takumi
adad0d53dc [CMake] Introduce moddir for MODULE -- corresponding to LIBRARY_OUTPUT_DIRECTORY.
On Win32.DLL, it points not lib but bin.

LIBRARY_OUTPUT_DIRECTORY affects add_library(MODULE), especially Win32.DLL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212903 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-13 13:33:26 +00:00
NAKAMURA Takumi
eddc485a8f bugpoint/ToolRunner.cpp: ProcessFailure(): Close ErrorFD immediately, or it couldn't be reopened on Win32.
FIXME: We may have an option in openFileForWrite(), not to use ResultFD but to close it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212902 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-13 13:28:18 +00:00
David Majnemer
e8d826b844 IR: Allow comdats to be applied to globals with internal linkage
Our verifier check for checking if a global has local linkage was too
strict.  Forbid private linkage but permit local linkage.

Object file formats permit this and forbidding it prevents elimination
of unused, internal, vftables under the MSVC ABI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212900 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-13 04:56:11 +00:00
David Majnemer
f803b3d992 MC: Let non-temporary COFF aliases be in symtab
MC was aping a binutils bug where aliases would default their linkage to
private instead of internal.

I've sent a patch to the binutils maintainers and they've recently
applied it to the GNU assembler sources.

This fixes PR20152.

Differential Revision: http://reviews.llvm.org/D4395

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212899 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-13 04:31:19 +00:00
Matt Arsenault
0ed20177c2 Remove unused include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212898 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-13 03:08:59 +00:00
Matt Arsenault
74c9fe26e6 R600: Use range for and fix missing consts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212897 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-13 03:06:43 +00:00
Matt Arsenault
bb098a4d87 R600: Make ShaderType private
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212896 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-13 03:06:39 +00:00
Matt Arsenault
98c2299532 R600: Run more tests with promote alloca disabled.
Re-run tests changed in r211110 to test both paths.
Also fix broken check line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212895 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-13 02:46:17 +00:00
Matt Arsenault
ff71f3dac1 R600: Run private-memory test with and without alloca promote
The unpromoted path still needs to be tested since we can't
always promote to using LDS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212894 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-13 02:18:06 +00:00
Matt Arsenault
8e53751320 R600: Add option to disable promote alloca
This can make writing some tests harder, so add a flag
to disable it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212893 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-13 02:08:26 +00:00
Matt Arsenault
8ef1fa761f Try to fix MSVC warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212889 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 23:16:26 +00:00
Matt Arsenault
bf9b767eb8 Try to fix MSVC build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212888 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 23:09:02 +00:00
Matt Arsenault
4118913074 Try to fix MSVC build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212886 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 22:19:49 +00:00
Matt Arsenault
661ca49da7 Templatify DominanceFrontier.
Theoretically this should now work for MachineBasicBlocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212885 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 21:59:52 +00:00
Saleem Abdulrasool
01c06d7954 AArch64: add support for llvm.aarch64.hint intrinsic
This adds a llvm.aarch64.hint intrinsic to mirror the llvm.arm.hint in order to
support the various hint intrinsic functions in the ACLE.

Add an optional pattern field that permits the subclass to specify the pattern
that matches the selection.  The intrinsic pattern is set as mayLoad, mayStore,
so overload the value for the definition of the hint instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212883 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 21:20:49 +00:00
Saleem Abdulrasool
1bbed94228 MC: remove use of unnecessary variable
Due to the fact that the windows unwinding has the concept of chained frames, we
maintain a current frame info pointer that is adjusted on any push and pop of a
unwinding context.  This just removes an unnecessary variable that was used to
mirror the DWARF unwinding code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212882 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 20:49:13 +00:00
Saleem Abdulrasool
8e69909cc2 MC: rename MCW64UnwindInfo to MCWinFrameInfo
This structure contains information related to the call frame used to generate
unwinding information.  Rename this to reflect the future use to represent the
shared state between various architectures for WinCFI information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212881 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 20:49:09 +00:00
Simon Atanasyan
dafce2c9a6 [ELFYAML] Group ELF section type flags to target specific blocks.
Recognize only flags which correspond to the current target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212880 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 18:25:08 +00:00
Owen Anderson
452bd5f9c6 Fix an issue with the MergeBasicBlockIntoOnlyPred() helper function where it did
not properly handle the case where the predecessor block was the entry block to
the function.  The only in-tree client of this is JumpThreading, which worked
around the issue in its own code.  This patch moves the solution into the helper
so that JumpThreading (and other clients) do not have to replicate the same fix
everywhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212875 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 07:12:47 +00:00
Alexey Samsonov
b2d259060d [ASan] Collect unmangled names of global variables in Clang to print them in error reports.
Currently ASan instrumentation pass creates a string with global name
for each instrumented global (to include global names in the error report). Global
name is already mangled at this point, and we may not be able to demangle it
at runtime (e.g. there is no __cxa_demangle on Android).

Instead, create a string with fully qualified global name in Clang, and pass it
to ASan instrumentation pass in llvm.asan.globals metadata. If there is no metadata
for some global, ASan will use the original algorithm.

This fixes https://code.google.com/p/address-sanitizer/issues/detail?id=264.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212872 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 00:42:52 +00:00
Matt Arsenault
cc6a418600 R600: Add missing tests for some intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212870 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 00:36:19 +00:00
Duncan P. N. Exon Smith
8ff8772676 BFI: Add constructor for Weight
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212868 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 00:26:00 +00:00
Duncan P. N. Exon Smith
d164a164ec BFI: Clean up BlockMass
Implementation is small now -- the interesting logic was moved to
`BranchProbability` a while ago.  Move it into `bfi_detail` and get rid
of the related TODOs.

I was originally planning to define it within `BlockFrequencyInfoImpl`
(or `BFIIBase`), but it seems cleaner in a namespace.  Besides,
`isPodLike` needs to be specialized before `BlockMass` can be used in
some of the other data structures, and there isn't a clear way to do
that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212866 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 00:21:30 +00:00
Reid Kleckner
e2729b9a98 Option: Propagate flags from groups to options in each group
This should make it easy to set a flag for a whole group of clang driver
options.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212865 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 00:18:58 +00:00
Lang Hames
f7d3052fc7 [RuntimeDyld] Fix stub size and offset for AArch64 in RuntimeDyldMachO.h.
<rdar://problem/17648000>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212864 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 00:16:47 +00:00
Reid Kleckner
b233e0ea1e Avoid a warning from MSVC on "*/" in this code by inserting a space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212862 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12 00:06:46 +00:00
Duncan P. N. Exon Smith
1c224d8d88 BFI: Mark the end of namespaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212861 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 23:56:50 +00:00
Lang Hames
75ac35dca3 [RuntimeDyld] Add GOT support for AArch64 to RuntimeDyldMachO.
Test cases to follow once RuntimeDyldChecker supports introspection of stubs.

Fixes <rdar://problem/17648000>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212859 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 23:52:07 +00:00
Juergen Ributzka
b2e9db4109 Revert "[FastISel][X86] Implement the FastLowerIntrinsicCall hook."
This reverts commit r212851, because it broke the memset lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212855 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 23:10:08 +00:00
Juergen Ributzka
83772afe0e [FastISel][X86] Implement the FastLowerIntrinsicCall hook.
Rename X86VisitIntrinsicCall -> FastLowerIntrinsicCall, which effectively
implements the target hook.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212851 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 22:37:43 +00:00
Alexey Samsonov
bdfa6b0154 [ASan] Introduce a struct representing the layout of metadata entry in llvm.asan.globals.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212850 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 22:36:02 +00:00
Juergen Ributzka
30f9ff4bee [FastISel] Add target-independent patchpoint intrinsic support. WIP.
This implements the target-independent lowering for the patchpoint
intrinsic. Targets have to implement the FastLowerCall
hook to support this intrinsic.

Related to <rdar://problem/17427052>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212849 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 22:19:02 +00:00
Juergen Ributzka
324b3fc7c8 [FastISel] Add basic infrastructure to support a target-independent call lowering hook in FastISel. WIP
The infrastructure mimics the call lowering we have already in place for
SelectionDAG, but with limitations. For example structure return demotion and
non-simple types are not supported (yet).

Currently every backend has its own implementation and duplicated code for call
lowering. There is also no specified interface that could be called from
target-independent code. The target-hook is opt-in and doesn't affect current
implementations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212848 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 22:01:42 +00:00
Aditya Nandakumar
af6721bf06 When we sink an instruction, this can open up opportunity for the operands to be sunk - add them to the worklist
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212847 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 21:49:39 +00:00
Argyrios Kyrtzidis
41a6ddb277 Move the API and implementation of clang::driver::getARMCPUForMArch() to llvm::Triple::getARMCPUForArch().
Suggested by Eric Christopher.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212846 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 21:44:54 +00:00
Juergen Ributzka
56b7de65b0 [FastISel] Make isInTailCallPosition independent of SelectionDAG.
Break out the arguemnts required from SelectionDAG, so that this function can
also be used by FastISel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212844 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 20:50:47 +00:00
Juergen Ributzka
2f58a513f1 [FastISel] Breakout intrinsic lowering into a separate function and add a target-hook.
Create a separate helper function for target-independent intrinsic lowering. Also
add an target-hook that allows to directly call into a target-sepcific intrinsic
lowering method. Currently the implementation is opt-in and doesn't affect
existing target implementations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212843 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 20:42:12 +00:00
Kevin Enderby
7f50100cfa Add the "-s" flag to llvm-nm for Mach-O files that prints symbols only in
the specified section.  This is same functionality as darwin’s nm(1) "-s" flag.

There is one FIXME in the code and I’m all ears to anyone that can help me
with that.  This option takes exactly two strings and should be allowed
anywhere on the command line.  Such that "llvm-nm -s __TEXT __text foo.o"
would work. But that does not as the CommandLine Library does not have a
way to make this work as far as I can tell.  For now the "-s __TEXT __text"
has to be last on the command line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212842 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 20:30:00 +00:00
Alp Toker
1736df6ae0 Simplify the raw_svector_ostream tweak from r212816
The memcpy() and overlap helps didn't help much with timings, so clean up the change.

The difference at this point is that we now leave growth of the storage buffer
up to SmallVector's implementation:

 -   OS.reserve(OS.capacity() * 2);
 +   OS.reserve(OS.size() + 64);

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212837 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 18:23:08 +00:00
Ulrich Weigand
c345ba880d [MC] Constify MCELF::GetVisibility and MCELF::getOther
These two routines didn't take a "const MCSymbolData &SD"
like the other MCELF::Get routines for some reason ...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212834 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 17:34:44 +00:00
Ulrich Weigand
edb27188b4 [PowerPC] Fix invalid displacement created by LocalStackAlloc
This commit fixes a bug in PPCRegisterInfo::isFrameOffsetLegal that
could result in the LocalStackAlloc pass creating an MI instruction
out-of-range displacement:
        %vreg17<def> = LD 33184, %vreg31; mem:LD8[%g](align=32)
        %G8RC:%vreg17 G8RC_and_G8RC_NOX0:%vreg31
(In final assembler output the top bits are stripped off, resulting
in a negative offset loading from below the stack pointer.)

Common code expects the isFrameOffsetLegal routine to verify whether
adding a given offset to the offset already present in the instruction
results in a valid displacement.  However, on PowerPC the routine
did not take the already present instruction offset into account.

This commit fixes isFrameOffsetLegal to add the instruction offset,
and updates a local caller (needsFrameBaseReg) to no longer add the
instruction offset itself before calling isFrameOffsetLegal.

Reviewed by Hal Finkel.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212832 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 17:19:31 +00:00
Marek Olsak
438e1f2ad8 R600/SI: Use i32 vectors for resources and samplers
This affects new intrinsics only.

What surprises me is that v32i8 still works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212831 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 17:11:52 +00:00
Marek Olsak
5a35fdcafb R600/SI: add sample and image intrinsics exposing all instruction fields
We need the intrinsics with offsets, so why not just add them all.
The R128 parameter will also be useful for reducing SGPR usage.
GL_ARB_image_load_store also adds some image GLSL modifiers like "coherent",
so Mesa will probably translate those to slc, glc, etc.

When LLVM 3.5 is released, I'll switch Mesa to these new intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212830 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 17:11:46 +00:00
Marek Olsak
4071d6f58b R600/SI: fix shadow mapping for 1D and 2D array textures
It was conflicting with def TEX_SHADOW_ARRAY, which also handles them.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212829 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 17:11:39 +00:00
Timur Iskhodzhanov
cc00568a75 Add a test case for r212596
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212828 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 16:32:53 +00:00
NAKAMURA Takumi
9d03442bb5 llvm/test/BugPoint/compile-custom.ll: Use explicit %python to invoke a test script, compile-custom.ll.py, for shebang-incapable hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212820 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 14:44:10 +00:00
NAKAMURA Takumi
ffbe320e79 llvm/test/lit.cfg: Let %python available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212819 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 14:36:39 +00:00