aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Delete dead code.Rafael Espindola2013-07-111-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186079 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for truncating names in archives.Rafael Espindola2013-07-113-42/+9
| | | | | | | | | | * All systems we support have some form of long name support. * The options has different names and semantics in different implementations ('f' on gnu, 'T' on OS X), which makes it unlikely it is normally used on build systems. * It was completely untested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186078 91177308-0d34-0410-b5e6-96231b3b80d8
* Sync llvm-ar's help string with the options it supports.Rafael Espindola2013-07-111-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186076 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce the number of indirections in the attributes implementation.Benjamin Kramer2013-07-112-178/+131
| | | | | | | | | | | - Coallocate entires for AttributeSetImpls and Nodes after the class itself. - Remove mutable iterators from immutable classes. - Remove unused context field from AttributeImpl. - Derive Enum/Align/String attribute implementations from AttributeImpl instead of having a whole new inheritance tree for them. - Derive AlignAttributeImpl from EnumAttributeImpl. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186075 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add testcase missing from r186073Richard Sandiford2013-07-111-0/+266
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186074 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Use zeroing form of RISBG for shift-and-AND sequencesRichard Sandiford2013-07-112-7/+68
| | | | | | | Extend r186072 to handle shifts and ANDs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186073 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Use zeroing form of RISBG for some AND sequencesRichard Sandiford2013-07-1127-263/+494
| | | | | | | | | | | | | RISBG can handle some ANDs for which no AND IMMEDIATE exists. It also acts as a three-operand AND for some cases where an AND IMMEDIATE could be used instead. It might be worth adding a pass to replace RISBG with AND IMMEDIATE in cases where the register operands end up being the same and where AND IMMEDIATE is smaller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186072 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Allow 8-bit operands to RISBGRichard Sandiford2013-07-114-14/+13
| | | | | | | | | | | | | RISBG has three 8-bit operands (I3, I4 and I5). I'd originally restricted all three to 6 bits, since that's the only range we intended to use at the time. However, the top bit of I4 acts as a "zero" flag for RISBG, while the top bit of I3 acts as a "test" flag for RNSBG & co. This patch therefore allows them to have the full 8-bit range. I've left the fifth operand as a 6-bit value for now since the upper 2 bits have no defined meaning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186070 91177308-0d34-0410-b5e6-96231b3b80d8
* TryToSimplifyUncondBranchFromEmptyBlock was checking that any commonDuncan Sands2013-07-112-24/+386
| | | | | | | | | | | predecessors of the two blocks it is attempting to merge supply the same incoming values to any phi in the successor block. This change allows merging in the case where there is one or more incoming values that are undef. The undef values are rewritten to match the non-undef value that flows from the other edge. Patch by Mark Lacey. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186069 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize AsmPrinter::MF in the constructorHal Finkel2013-07-111-1/+1
| | | | | | | | | | | MF is normally initialized in AsmPrinter::SetupMachineFunction, but if the file contains only globals (no functions), then we need this to be initialized because, when encountering an error, lowerConstant() references it. This should fix the non-deterministic failures of test/CodeGen/X86/nonconst-static-iv.ll, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186068 91177308-0d34-0410-b5e6-96231b3b80d8
* RegScavenger should not exclude undef usesHal Finkel2013-07-112-1/+49
| | | | | | | | | | | | | | When computing currently-live registers, the register scavenger excludes undef uses. As a result, undef uses are ignored when computing the restore points of registers spilled into the emergency slots. While the register scavenger normally excludes from consideration, when scavenging, registers used by the current instruction, we need to not exclude undef uses. Otherwise, we might end up requiring more emergency spill slots than we have (in the case where the undef use *is* the currently-spilled register). Another bug found by llvm-stress. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186067 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix indentation. No functional change.Craig Topper2013-07-111-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186065 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a warning.Nadav Rotem2013-07-111-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186064 91177308-0d34-0410-b5e6-96231b3b80d8
* Consolidate more lit tests.Nadav Rotem2013-07-113-62/+54
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186063 91177308-0d34-0410-b5e6-96231b3b80d8
* Consolidate some of the lit tests.Nadav Rotem2013-07-114-75/+57
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186062 91177308-0d34-0410-b5e6-96231b3b80d8
* Consolidate some of the lit tests.Nadav Rotem2013-07-115-61/+191
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186060 91177308-0d34-0410-b5e6-96231b3b80d8
* SLPVectorizer: refactor the code that places extracts. Place the code that ↵Nadav Rotem2013-07-111-41/+131
| | | | | | decides where to put extracts in the build-tree phase. This allows us to take the cost of the extracts into account. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186058 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach TailRecursionElimination to handle certain cases of nocapture escaping ↵Michael Gottesman2013-07-113-89/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | allocas. Without the changes introduced into this patch, if TRE saw any allocas at all, TRE would not perform TRE *or* mark callsites with the tail marker. Because TRE runs after mem2reg, this inadequacy is not a death sentence. But given a callsite A without escaping alloca argument, A may not be able to have the tail marker placed on it due to a separate callsite B having a write-back parameter passed in via an argument with the nocapture attribute. Assume that B is the only other callsite besides A and B only has nocapture escaping alloca arguments (*NOTE* B may have other arguments that are not passed allocas). In this case not marking A with the tail marker is unnecessarily conservative since: 1. By assumption A has no escaping alloca arguments itself so it can not access the caller's stack via its arguments. 2. Since all of B's escaping alloca arguments are passed as parameters with the nocapture attribute, we know that B does not stash said escaping allocas in a manner that outlives B itself and thus could be accessed indirectly by A. With the changes introduced by this patch: 1. If we see any escaping allocas passed as a capturing argument, we do nothing and bail early. 2. If we do not see any escaping allocas passed as captured arguments but we do see escaping allocas passed as nocapture arguments: i. We do not perform TRE to avoid PR962 since the code generator produces significantly worse code for the dynamic allocas that would be created by the TRE algorithm. ii. If we do not return twice, mark call sites without escaping allocas with the tail marker. *NOTE* This excludes functions with escaping nocapture allocas. 3. If we do not see any escaping allocas at all (whether captured or not): i. If we do not have usage of setjmp, mark all callsites with the tail marker. ii. If there are no dynamic/variable sized allocas in the function, attempt to perform TRE on all callsites in the function. Based off of a patch by Nick Lewycky. rdar://14324281. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186057 91177308-0d34-0410-b5e6-96231b3b80d8
* Move r186044 tests into CodeGen/X86Hal Finkel2013-07-112-4/+2
| | | | | | | | I had thought that these tests could be target-neutral, but in practice this is not the case (on some targets, like Hexagon and Darwin), they trigger an assert (a different assert than the one that r186044 fixes). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186051 91177308-0d34-0410-b5e6-96231b3b80d8
* Set REQUIRES shell on the test cases for r186044Hal Finkel2013-07-102-0/+2
| | | | | | Trying to fix the i686-mingw32 build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186046 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL the test cases for r186044 on HexagonHal Finkel2013-07-102-0/+2
| | | | | | | For some reason, the Hexagon backend does not reject these invalid static initializer expressions, but instead crashes in AsmPrinter::EmitGlobalConstant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186045 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't assert if we can't constant fold extract/insertvalueHal Finkel2013-07-103-8/+37
| | | | | | | | | | | | | | | A non-constant-foldable static initializer expression containing insertvalue or extractvalue had been causing an assert: Constants.cpp:1971: Assertion `FC && "ExtractValue constant expr couldn't be folded!"' failed. Now we report a more-sensible "Unsupported expression in static initializer" error instead. Fixes PR15417. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186044 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove this test for now.Rafael Espindola2013-07-101-7/+0
| | | | | | | It is not reliable to depend on the output of llvm_unreachable. The original change will have proper tests when llvm-ar moves to lib/Object (soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186043 91177308-0d34-0410-b5e6-96231b3b80d8
* CommandLine.rst: remove tiny bit of bad mark-upHans Wennborg2013-07-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186042 91177308-0d34-0410-b5e6-96231b3b80d8
* Find the symbol table on archives created on OS X.Rafael Espindola2013-07-102-3/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186041 91177308-0d34-0410-b5e6-96231b3b80d8
* Move tests from test/Archive to test/Object.Rafael Espindola2013-07-1018-46/+23
| | | | | | | | There is no lib/Archive anymore and some archive tests were in test/Archive and others in test/Object. Since archive is just one of the formats supported by lib/Object, test/Object is probably the best location. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186038 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment.Adrian Prantl2013-07-101-0/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186035 91177308-0d34-0410-b5e6-96231b3b80d8
* Put ELF COMDAT relocations into the relevant COMDAT group.Tim Northover2013-07-103-3/+39
| | | | | | | | Patch from Игорь Пашев (I do hope we support utf-8 commit messages; I also hope he'll forgive me for transliterating it as Igor Pashev in case things go horribly wrong). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186034 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespacStephen Lin2013-07-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186032 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a testcase for r186014.Adrian Prantl2013-07-101-0/+139
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186031 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't crash in 'llvm -s' when an archive has no symtab.Rafael Espindola2013-07-103-22/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186029 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix %t typo in Ocaml bindings test.Reid Kleckner2013-07-101-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186027 91177308-0d34-0410-b5e6-96231b3b80d8
* [objc-arc] Changed 'mode: c++' => 'C++' at Nick Lewycky's suggestion. Also ↵Michael Gottesman2013-07-107-7/+7
| | | | | | removed unnecessary mode: c++ lines from .cpp files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186026 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed "mode: c++" => "C++" at the suggestion of Nick Lewycky.Michael Gottesman2013-07-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186025 91177308-0d34-0410-b5e6-96231b3b80d8
* Update doxygen comment to match renamed parameters.Benjamin Kramer2013-07-101-2/+2
| | | | | | Found by -Wdocumentation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186021 91177308-0d34-0410-b5e6-96231b3b80d8
* MemoryBuffer::getFile handles zero sized files, no need to duplicate the test.Rafael Espindola2013-07-101-21/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186018 91177308-0d34-0410-b5e6-96231b3b80d8
* Replacing an empty switch with its moral equivalent. No functional changes ↵Aaron Ballman2013-07-102-8/+2
| | | | | | intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186017 91177308-0d34-0410-b5e6-96231b3b80d8
* Use status to implement file_size.Rafael Espindola2013-07-103-36/+14
| | | | | | | | | | The status function is already using a syscall that returns the file size. Remember it and implement file_size as a simple wrapper. No functionally change, but clients that already use status now can avoid calling file_size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186016 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the appropriate unsigned int type for the offset.Adrian Prantl2013-07-101-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186015 91177308-0d34-0410-b5e6-96231b3b80d8
* Safeguard DBG_VALUE handling. Unbreaks the ASAN buildbot.Adrian Prantl2013-07-101-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186014 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code.Craig Topper2013-07-101-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186013 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Initial local memory supportMichel Danzer2013-07-108-55/+100
| | | | | | | | Enough for the radeonsi driver to use it for calculating derivatives. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186012 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Add pattern for the AMDGPU.barrier.local intrinsicMichel Danzer2013-07-101-1/+10
| | | | | | | | lit test coverage to follow in the next commit. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186011 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Add intrinsic for retrieving the current thread IDMichel Danzer2013-07-103-2/+25
| | | | | | Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186010 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Initial support for LDS/GDS instructionsMichel Danzer2013-07-105-0/+68
| | | | | | Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186009 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Add intrinsics for texture sampling with user derivativesMichel Danzer2013-07-103-1/+147
| | | | | | Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186008 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm/ADT/NullablePtr.h, there are no uses of it in-tree.Argyrios Kyrtzidis2013-07-101-62/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186006 91177308-0d34-0410-b5e6-96231b3b80d8
* PPC: Add a better comment about the i64 FI fixupHal Finkel2013-07-101-2/+13
| | | | | | | | In discussing this change with Bill Schmidt, it was decided that the original comment about negative FIs was incorrect. We'll still exclude them for now, but now with a more-accurate explanation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186005 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting commit r185999 due to buildboot failure.Vladimir Medic2013-07-101-10/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186001 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting commit r185999 due to buildboot failure.Vladimir Medic2013-07-102-49/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186000 91177308-0d34-0410-b5e6-96231b3b80d8