107 Commits

Author SHA1 Message Date
brad
ec010cbf26 r228507
Avoid integer overflows around realloc calls resulting in potential
heap. Problem identified by Guido Vranken.

r225819
Use the integrated assembler as default on PowerPC
r225957
Use the integrated assembler by default on SPARC.
r225958
Use the integrated assembler by default on 32-bit PowerPC and SPARC.
2015-02-11 00:29:05 +00:00
brad
8691b692bf r202719
Don't emit a blank line when running llvm-config --system-libs.
2015-01-22 12:29:36 +00:00
brad
ef8d048a5d Commited upstream. 2015-01-06 00:58:02 +00:00
brad
8d28f1b005 Contrary to pascal@'s disbelief there does seem to be an issue with PIE. Have
the build disable PIE on PowerPC as a workaround for the time being until it
can be determined what the issue is and fixed properly.

Workarounded provided by pascal@
2015-01-03 00:54:12 +00:00
brad
5189bb6550 r223708
[PowerPC] Don't use a non-allocatable register to implement the 'cc' alias
2014-12-30 22:41:09 +00:00
brad
1693272b86 r223328
[PowerPC] 'cc' should be an alias only to 'cr0'
2014-12-30 22:25:47 +00:00
brad
c5aa849d32 r213890
Use the same .eh_frame encoding for 32bit PPC as on i386.
2014-12-30 05:23:32 +00:00
brad
c2a982e3cd r203699
Allow exclamation and tilde to be parsed as a part of the ppc asm operand.

r209821
[PPC] Use alias symbols in address computation.
2014-12-28 00:30:17 +00:00
brad
3c28eb1c6c r221170
Implement vaarg lowering for ppc32. Lowering of scalars and
aggregates is supported. Complex numbers are not.
2014-12-16 21:10:31 +00:00
brad
0b233ffdc3 r223171
PR21302. Vectorize only bottom-tested loops.
2014-12-12 21:51:39 +00:00
brad
12e94b4391 r221709
Totally forget deallocated SDNodes in SDDbgInfo.

What would happen before that commit is that the SDDbgValues associated with
a deallocated SDNode would be marked Invalidated, but SDDbgInfo would keep
a map entry keyed by the SDNode pointer pointing to this list of invalidated
SDDbgNodes. As the memory gets reused, the list might get wrongly associated
with another new SDNode. As the SDDbgValues are cloned when they are transfered,
this can lead to an exponential number of SDDbgValues being produced during
DAGCombine like in http://llvm.org/bugs/show_bug.cgi?id=20893

Note that the previous behavior wasn't really buggy as the invalidation made
sure that the SDDbgValues won't be used. This commit can be considered a
memory optimization and as such is really hard to validate in a unit-test.
2014-11-15 03:26:40 +00:00
ajacoutot
703fb644d7 No need for default CMAKE_BUILD_TYPE. 2014-11-07 10:40:05 +00:00
brad
52448afff1 Remove the .quad assembler workaround for i386 now that the external
assembler has been fixed. The integrated assembler already handled
this properly but the workaround didn't take that into consideration.

ok daniel@
2014-10-28 17:52:05 +00:00
brad
2ddb9623ce take maintainer. 2014-10-11 20:23:46 +00:00
brad
32b210e86c r208965
Sparc: disable printing on longer "brX,pt" aliases

r208966
Sparc: disable printing of jmp/call aliases (C++ does it)

r217801
Fix a lot of confusion around inserting nops on empty functions.
2014-09-18 20:19:27 +00:00
brad
dafbe5d7d9 r217410
Set trunc store action to Expand for all X86 targets.

When compiling without SSE2, isTruncStoreLegal(F64, F32) would return Legal, whereas
with SSE2 it would return Expand. And since the Target doesn't seem to actually
handle a truncstore for double -> float, it would just output a store of a full
double in the space for a float hence overwriting other bits on the stack.
2014-09-15 19:24:16 +00:00
brad
e50d65c350 r205331
Debug info: fix a crash when emitting IndirectFieldDecls, which were previously
not handled at all.
2014-09-12 12:39:47 +00:00
brad
6b3e8776f2 r215238 / r217611
Provide implementations of getNoopForMachoTarget for PowerPC / SPARC.
2014-09-11 17:59:51 +00:00
brad
d0a5824619 r213427
[PowerPC] 32-bit ELF PIC support

r213899
Don't use 128bit functions on PPC32.

This adds initial support for PPC32 ELF PIC (Position Independent Code; the
-fPIC variety), thus rectifying a long-standing deficiency in the PowerPC
backend.

r213960
[PowerPC] Support TLS on PPC32/ELF
2014-09-11 17:54:13 +00:00
brad
fe7db59349 - Remove a local PowerPC patch we don't need.
- A fix for the SPARC float handling. Adding the missing & to the field allows
  the backend feature flag to be passed back which it was not without it.
- Add some patches to enable the integrated assembler on PowerPC / SPARC.
  I left these out before as I thought because Clang was not obeying this
  setting and had its own similar bits they were not necessary but turns
  out the backend has some code that does obey this setting.

ok sthen@
2014-08-29 14:28:32 +00:00
brad
06acbb6e4b r211435
Legalizer: Add support for splitting insert_subvectors.

We handle this by spilling the whole thing to the stack and doing the
insertion as a store.

PR19492. This happens in real code because the vectorizer creates v2i128 when AVX is
enabled.

ok matthew@
2014-08-14 01:08:09 +00:00
pascal
b7bbd19079 Fix detection of arc4random.
ok brad@ sthen@
2014-07-26 09:27:29 +00:00
brad
d5b197e53f Bring in some commits from upstream..
r213105
Use the integrated assembler by default on OpenBSD/sparc

r212838
Handle SPARC float command line parameters for SPARCv9.

ok matthew@
2014-07-16 22:16:54 +00:00
brad
9d0a0c6200 Sync up the SPARC backend up to commit r203424.
ok matthew@
2014-07-11 01:05:24 +00:00
brad
5508a97976 Bring in fixes from 3.4.1 / 3.4.2 that do not already exist in the
3.5 snapshot (which around 60% of them did)..

r203025, r203050, r203054, r203281, r203581, r203719, r203818, r204155, r204304,
r205067, r205630, r205738, r207990, r208501.

ok matthew@
2014-07-10 22:46:37 +00:00
brad
e1c644379d r211624
Use appropriate default PIE settings for OpenBSD.

ok matthew@
2014-07-10 19:26:48 +00:00
brad
07775f755c Add SVN commit revision. 2014-06-16 23:14:15 +00:00
brad
db151cc6a6 Some fixes from uptream..
- Use dwarf-2 by default on OpenBSD and FreeBSD.
- Make VSELECT selection terminate in cases where the condition type has
  to be split and the result type widened.
  (fixes an OOM crash with the vectorizer on i386 if not utilizing SSE2
   or newer)
- The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a
  function that reads two __m64 values and packs four 32-bit values into
  four 16-bit values.

Fix profiling..

- Alias the command line parameter -p to -pg.

From Bitrig

ok sthen@
2014-06-13 22:29:40 +00:00
brad
33c95574ef r209479
Don't reduce the stack protector level given -fstack-protector.

ok sthen@
2014-05-29 00:23:36 +00:00
brad
785470a4b5 Add SVN commit revision. 2014-05-22 13:30:23 +00:00
brad
40bd3b5c62 - Switch to stack protector strong by default
- Fix the --param ssp-buffer-size= support

ok sthen@
2014-05-17 11:41:15 +00:00
brad
017c881043 Disable the terminfo support which is used to determine if a terminal
has colours support, but the added dependency seems to cause issues
when linking the LLVM libraries as is. Probably an issue with the
build infrastructure but we don't care about colours.

Requeted by jsg@

ok sthen@
2014-04-19 19:56:21 +00:00
brad
698bc29458 Add SVN revision 2014-04-18 21:26:56 +00:00
brad
207a2888cc Update to LLVM 3.5 (trunk) snapshot just before switching to an unconditional
C++11 codebase.

This brings in a number of improvements over 3.4 including..
X86 assembler with 16-bit support
Much improved SPARC backend
stack protector strong support

ok sthen@
2014-04-18 09:30:48 +00:00
brad
fa8c49b548 lit wants a copy of bash around for the test framework.
ok sthen@
2013-12-16 20:34:46 +00:00
brad
dc5f6f6c36 - Fix the test target since the switch from GNU autoconf/make to CMake
- Add the scan-build man page
- Correct the capitalization of Clang in DESCR

ok sthen@
2013-12-07 10:30:39 +00:00
brad
b93422e552 - Remove MAKE_FLAGS variables as they were only relevant for the GNU autoconf/make
build infrastructure
- Remove the CMake patch as sebastia@ says it did not actually work and should be
  removed
- Some frontend driver tweaks for the external assembler handling for 32-bit mode
  (-m32) on amd64, powerpc handling and bring the ABI determination bits in line
  with the other OS's to use the getGnuCompatibleMipsABIName function

ok sthen@
2013-12-02 22:14:29 +00:00
sthen
701c91e413 kill VMEM_WARNING 2013-11-25 14:16:22 +00:00
sthen
27f03b1c52 bump REVISION for any ports using route messages. regen some distinfos and
remove unnecessary USE_GROFFs while there.
2013-10-31 21:12:12 +00:00
jsg
b1ef8a8075 enable the R600 target
ok sthen@ brad@
2013-08-06 23:33:44 +00:00
naddy
b44ec0e969 this profits a lot from parallel building under dpb 2013-06-28 11:14:38 +00:00
brad
ffaa1a2b14 Update to LLVM 3.3.
ok sthen@
2013-06-21 22:09:12 +00:00
sebastia
21cb354a14 Allow upcoming libobjc2 to find LLVM-Config.cmake in its configure stage.
Fix from and OK zhuk@
OK dcoppa@
2013-05-02 15:41:57 +00:00
sthen
17c95658e6 Pull in r175057 from upstream LLVM, via FreeBSD, found by Wada Hiroyuki.
X86: Disable generation of rep;movsl when %esi is used as a base pointer.
This happens when there is both stack realignment and a dynamic alloca in the
function. If we overwrite %esi (rep;movsl uses fixed registers) we'll lose the
base pointer and the next register spill will write into oblivion.
2013-03-30 12:10:40 +00:00
espie
bcf3856632 PERMIT_* / REGRESS->TEST sweep 2013-03-11 10:50:00 +00:00
brad
c54dae5771 Add some initial bits for mips64 to pass down the proper flags
to the assembler and linker. Still work in progress.

ok sthen@
2013-01-08 10:14:13 +00:00
brad
48a783ee6f - Remove USE_LIBTOOL and explicit CONFIGURE_STYLE as the CMake
module does that for us
- Shuffle some of the Makefile bits around

ok sthen@
2013-01-08 09:53:46 +00:00
brad
ac1ecd7415 Silence some warnings and allow passing down some feature flags to the linker.
ok sthen@
2013-01-04 01:10:30 +00:00
brad
cc75b05c01 Update to LLVM 3.2 and switces to __guard_local for stack protector support.
Initial work from landry@ with some fixes and further tweaking from pascal@ and brad@

ok sthen@ landry@
2012-12-23 20:49:29 +00:00
jasper
9319ac3f2e - drop the 'svn' suffix from llvm-config --version output.
ok sthen@
2012-10-16 18:22:30 +00:00