summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/MergeFunc
Commit message (Collapse)AuthorAgeFilesLines
...
* Added functions cross-reference test.Stepan Dyatkovskiy2014-06-091-0/+27
| | | | | | | | | | | Originally this similar was initiated by Björn Steinbrink here: http://reviews.llvm.org/D3437 Bug itself has been fixed by principal changes in MergeFunctions. Though special checks for functions merging are still actual. And the test has been accepted with slight modifications. llvm-svn: 210486
* IR: Don't allow non-default visibility on local linkageDuncan P. N. Exon Smith2014-05-073-17/+17
| | | | | | | | | | | | | | | | | Visibilities of `hidden` and `protected` are meaningless for symbols with local linkage. - Change the assembler to reject non-default visibility on symbols with local linkage. - Change the bitcode reader to auto-upgrade `hidden` and `protected` to `default` when the linkage is local. - Update LangRef. <rdar://problem/16141113> llvm-svn: 208263
* [IPO/MergeFunctions] changes so it doesn't try to bitcast a struct return ↵Carlo Kok2014-04-301-0/+40
| | | | | | type but instead recreates it with insert/extract value. llvm-svn: 207679
* PR17925 bugfix.Stepan Dyatkovskiy2013-11-264-29/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Short description. This issue is about case of treating pointers as integers. We treat pointers as different if they references different address space. At the same time, we treat pointers equal to integers (with machine address width). It was a point of false-positive. Consider next case on 32bit machine: void foo0(i32 addrespace(1)* %p) void foo1(i32 addrespace(2)* %p) void foo2(i32 %p) foo0 != foo1, while foo1 == foo2 and foo0 == foo2. As you can see it breaks transitivity. That means that result depends on order of how functions are presented in module. Next order causes merging of foo0 and foo1: foo2, foo0, foo1 First foo0 will be merged with foo2, foo0 will be erased. Second foo1 will be merged with foo2. Depending on order, things could be merged we don't expect to. The fix: Forbid to treat any pointer as integer, except for those, who belong to address space 0. llvm-svn: 195769
* Teach MergeFunctions about address spacesMatt Arsenault2013-11-103-0/+93
| | | | llvm-svn: 194342
* Don't merge tiny functions.Matt Arsenault2013-10-012-2/+25
| | | | | | | | | | | | | | | | | | | | | It's silly to merge functions like these: define void @foo(i32 %x) { ret void } define void @bar(i32 %x) { ret void } to get define void @bar(i32) { tail call void @foo(i32 %0) ret void } llvm-svn: 191786
* Bugfix for PR17099:Stepan Dyatkovskiy2013-09-171-0/+18
| | | | | | | | | | | Wrong cast operation. MergeFunctions emits Bitcast instead of pointer-to-integer operation. Patch fixes MergeFunctions::writeThunk function. It replaces unconditional Bitcast creation with "Value* createCast(...)" method, that checks operand types and selects proper instruction. See unit-test as example. llvm-svn: 190859
* Add missing CHECK-LABELMatt Arsenault2013-09-141-0/+1
| | | | llvm-svn: 190740
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-161-1/+0
| | | | | | | | | | | | | | | | | - Instead of setting the suffixes in a bunch of places, just set one master list in the top-level config. We now only modify the suffix list in a few suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py). - Aside from removing the need for a bunch of lit.local.cfg files, this enables 4 tests that were inadvertently being skipped (one in Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been XFAILED). - This commit also fixes a bunch of config files to use config.root instead of older copy-pasted code. llvm-svn: 188513
* TBAA: remove !tbaa from testing cases if not used.Manman Ren2013-04-301-7/+2
| | | | | | | This will make it easier to turn on struct-path aware TBAA since the metadata format will change. llvm-svn: 180796
* MergeFunc: Make pointer and integer types generate the same hash.Benjamin Kramer2013-04-191-1/+1
| | | | | | | | | The logic that actually compares the types considers pointers and integers the same if they are of the same size. This created a strange mismatch between hash and reality and made the test case for this fail on some platforms (yay, test cases). llvm-svn: 179905
* Make variable match any name.Bill Wendling2013-04-191-2/+2
| | | | llvm-svn: 179903
* Try explicitly setting the target triple to see if this gets it to pass on ARM.Bill Wendling2013-04-191-1/+1
| | | | llvm-svn: 179890
* Attempt to pacify this test for the buildbots.Chad Rosier2013-04-191-3/+3
| | | | llvm-svn: 179874
* Add test to make sure that a int-to-ptr can be merged correctly.Bill Wendling2013-04-191-0/+55
| | | | llvm-svn: 179869
* We are not able to bitcast a pointer to an integral value.Bill Wendling2013-04-151-0/+46
| | | | | | | | Two return types are not equivalent if one is a pointer and the other is an integral. This is because we cannot bitcast a pointer to an integral value. PR15185 llvm-svn: 179569
* Revert the test moves from 176733. Use "REQUIRES: asserts" instead.Jan Wen Voung2013-03-125-4/+4
| | | | llvm-svn: 176873
* Disable statistics on Release builds and move tests that depend on -stats.Jan Wen Voung2013-03-085-0/+4
| | | | | | | | | | | | | | | | | Summary: Statistics are still available in Release+Asserts (any +Asserts builds), and stats can also be turned on with LLVM_ENABLE_STATS. Move some of the FastISel stats that were moved under DEBUG() back out of DEBUG(), since stats are disabled across the board now. Many tests depend on grepping "-stats" output. Move those into a orig_dir/Stats/. so that they can be marked as unsupported when building without statistics. Differential Revision: http://llvm-reviews.chandlerc.com/D486 llvm-svn: 176733
* CastInst::castIsValid should return true if the dest type is the same asEvan Cheng2013-01-101-0/+36
| | | | | | Value's current type. The casting is trivial even for aggregate type. llvm-svn: 172143
* Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ↵Dmitri Gribenko2012-12-301-1/+1
| | | | | | | | ModuleID This is done to avoid odd test failures, like the one fixed in r171243. llvm-svn: 171250
* Fix the remaining TCL-style quotes found in the testsuite. This isChandler Carruth2012-07-022-3/+3
| | | | | | | | | | | | | | | | | another mechanical change accomplished though the power of terrible Perl scripts. I have manually switched some "s to 's to make escaping simpler. While I started this to fix tests that aren't run in all configurations, the massive number of tests is due to a really frustrating fragility of our testing infrastructure: things like 'grep -v', 'not grep', and 'expected failures' can mask broken tests all too easily. Essentially, I'm deeply disturbed that I can change the testsuite so radically without causing any change in results for most platforms. =/ llvm-svn: 159547
* Convert the uses of '|&' to use '2>&1 |' instead, which works on oldChandler Carruth2012-07-023-3/+3
| | | | | | | | | | versions of Bash. In addition, I can back out the change to the lit built-in shell test runner to support this. This should fix the majority of fallout on Darwin, but I suspect there will be a few straggling issues. llvm-svn: 159544
* Convert all tests using TCL-style quoting to use shell-style quoting.Chandler Carruth2012-07-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This was done through the aid of a terrible Perl creation. I will not paste any of the horrors here. Suffice to say, it require multiple staged rounds of replacements, state carried between, and a few nested-construct-parsing hacks that I'm not proud of. It happens, by luck, to be able to deal with all the TCL-quoting patterns in evidence in the LLVM test suite. If anyone is maintaining large out-of-tree test trees, feel free to poke me and I'll send you the steps I used to convert things, as well as answer any painful questions etc. IRC works best for this type of thing I find. Once converted, switch the LLVM lit config to use ShTests the same as Clang. In addition to being able to delete large amounts of Python code from 'lit', this will also simplify the entire test suite and some of lit's architecture. Finally, the test suite runs 33% faster on Linux now. ;] For my 16-hardware-thread (2x 4-core xeon e5520): 36s -> 24s llvm-svn: 159525
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-162-3/+1
| | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. llvm-svn: 150664
* Convert to the new EH model.Bill Wendling2011-11-081-10/+10
| | | | llvm-svn: 144050
* When removing a function from the function set and adding it to deferred, weNick Lewycky2011-02-091-0/+276
| | | | | | | | | | | | | could end up removing a different function than we intended because it was functionally equivalent, then end up with a comparison of a function against itself in the next round of comparisons (the one in the function set and the one on the deferred list). To fix this, I introduce a choice in the form of comparison for ComparableFunctions, either normal or "pointer only" used to find exact Function*'s in lookups. Also add some debugging statements. llvm-svn: 125180
* Fix surprising missed optimization in mergefunc where we forgot to considerNick Lewycky2011-01-271-0/+76
| | | | | | that relationships like "i8* null" is equivalent to "i32* null". llvm-svn: 124368
* Teach mergefunc how to emit aliases safely again -- but keep it turned it offNick Lewycky2011-01-251-0/+4
| | | | | | | for now. It's controlled by the HasGlobalAliases variable which is not attached to any flag yet. llvm-svn: 124182
* Arrays and vectors with different numbers of elements are not equivalent.Nick Lewycky2010-07-161-0/+18
| | | | llvm-svn: 108517
* Change tests from "opt %s" to "opt < %s" so that opt doesn't see theDan Gohman2009-09-113-3/+3
| | | | | | | | input filename so that opt doesn't print the input filename in the output so that grep lines in the tests don't unintentionally match strings in the input filename. llvm-svn: 81537
* Use opt -S instead of piping bitcode output through llvm-dis.Dan Gohman2009-09-081-1/+1
| | | | llvm-svn: 81257
* Change these tests to feed the assembly files to opt directly, insteadDan Gohman2009-09-083-3/+3
| | | | | | of using llvm-as, now that opt supports this. llvm-svn: 81226
* Given two identical weak functions, produce one internal function and two weakNick Lewycky2009-06-121-0/+13
| | | | | | thunks. llvm-svn: 73230
* This test is wrong. If you have two weak functions F and G you can't makeNick Lewycky2009-06-121-11/+0
| | | | | | | either one call the other since either one can be replaced at link time, and they need to be independent. llvm-svn: 73225
* Fix tests not to emit IR outputAnton Korobeynikov2008-11-042-2/+2
| | | | llvm-svn: 58729
* Changes from Duncan's review:Nick Lewycky2008-11-021-0/+11
| | | | | | | | * merge two weak functions by making them both alias a third non-weak fn * don't reimplement CallSite::hasArgument * whitelist the safe linkage types llvm-svn: 58568
* Add a new MergeFunctions pass. It finds identical functions and merges them.Nick Lewycky2008-11-023-0/+61
This triggers only 60 times in llvm-test (look at .llvm.bc, not .linked.rbc) and so it probably wont be turned on by default. Also, may of those are likely to go away when PR2973 is fixed. llvm-svn: 58557
OpenPOWER on IntegriCloud