summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Passes
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-192-8/+6
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* cmake: Don't install plugins used for examples or testsTom Stellard2019-01-141-1/+1
| | | | | | | | | | | | | | | | Summary: This patch drops install targets for LLVMHello.so, TestPlugin.so, and BugpointPasses.so. Reviewers: chandlerc, beanz, thakis, philip.pfaffe Reviewed By: chandlerc Subscribers: SquallATF, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D55965 llvm-svn: 351087
* cmake: Remove add_llvm_loadable_module()Tom Stellard2018-12-201-1/+1
| | | | | | | | | | | | | | | | | Summary: This function is very similar to add_llvm_library(), so this patch merges it into add_llvm_library() and replaces all calls to add_llvm_loadable_module(lib ...) with add_llvm_library(lib MODULE ...) Reviewers: philip.pfaffe, beanz, chandlerc Reviewed By: philip.pfaffe Subscribers: chapuni, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D51748 llvm-svn: 349839
* [NewPM] teach -passes= to emit meaningful error messagesFedor Sergeev2018-10-172-2/+4
| | | | | | | | | | | | | | All the PassBuilder::parse interfaces now return descriptive StringError instead of a plain bool. It allows to make -passes/aa-pipeline parsing errors context-specific and thus less confusing. TODO: ideally we should also make suggestions for misspelled pass names, but that requires some extensions to PassBuilder. Reviewed By: philip.pfaffe, chandlerc Differential Revision: https://reviews.llvm.org/D53246 llvm-svn: 344685
* Revert "[NewPM] teach -passes= to emit meaningful error messages"Fedor Sergeev2018-10-152-4/+2
| | | | | | This reverts r344519 due to failures in pipeline-parsing test. llvm-svn: 344524
* [NewPM] teach -passes= to emit meaningful error messagesFedor Sergeev2018-10-152-2/+4
| | | | | | | | | | | | | | | Summary: All the PassBuilder::parse interfaces now return descriptive StringError instead of a plain bool. It allows to make -passes/aa-pipeline parsing errors context-specific and thus less confusing. TODO: ideally we should also make suggestions for misspelled pass names, but that requires some extensions to PassBuilder. Reviewed By: philip.pfaffe, chandlerc Differential Revision: https://reviews.llvm.org/D53246 llvm-svn: 344519
* Revert "[cmake] Fix a unittest when `LLVM_LINK_LLVM_DYLIB` is requested."Volodymyr Sapsai2018-09-131-6/+4
| | | | | | | | | | This reverts commit r342150 as it caused test failure LLVM-Unit :: Passes/./PluginsTests/PluginsTests.LoadPlugin on multiple bots. llvm-svn: 342169
* [cmake] Fix a unittest when `LLVM_LINK_LLVM_DYLIB` is requested.Richard Diamond2018-09-131-4/+6
| | | | llvm-svn: 342150
* Revert "unittests: Don't install TestPlugin.so"Tom Stellard2018-08-161-1/+1
| | | | | | | | | This reverts commit r339897. This breaks the build on Windows and platforms where loadable modules aren't supported. llvm-svn: 339903
* unittests: Don't install TestPlugin.soTom Stellard2018-08-161-1/+1
| | | | | | | | | | | | | | Summary: add_llvm_loadable_module adds an install target by default, but this module is only used for a unit test, so we don't need to install it. Reviewers: philip.pfaffe, thakis Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D50668 llvm-svn: 339897
* Fix build warning compiling TestPlugin on Windows and disable Passes plugin ↵Nico Weber2018-05-192-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stuff on Windows since it fundamentally can't work Aaron Ballman reported that TestPlugin warned about it using exception handling without /EHsc flag, and that llvmGetPassInfo() had conflicting export attributes (dllimport in the header, dllexport in the source file). /EHsc is because TestPlugin didn't use the llvm_ cmake functions, so llvm_update_compile_flags didn't get called for the target (llvm_update_compile_flags explicitly passes /Ehs-c-, which fixes the warning). Use add_llvm_loadable_module instead of add_library(... MODULE) to fix this. This also has the side effect of not building the plugin on Windows. That's not a big problem, since before the plugin was built on Windows, but the test didn't attempt to load it, due to -DLLVM_ENABLE_PLUGIN not being passed to PluginsTests.cpp during compilation on Windows. This makes the plugin behavior consistent with e.g. lib/Transforms/Hello/CMakeLists.txt. (This also automatically sets LTDL_SHLIB_EXT correctly.) The dllimport/dllexport warning is more serious: Since LLVM doesn't generally use export annotations for its code, the only way the plugin could link was by linking in some LLVM libraries both into the test and the dll, so the plugin would call the llvm code in the dll instead of the copy in the main executable. This means globals weren't shared, and things generally can't work. (I think there's a build config where you can build a LLVM.dll which might work, but that wasn't how the test was configured. If that config is used, the dll should still be built, but I haven't checked). Now that add_llvm_loadable_module is used, LLVM_LINK_COMPONENTS got linked into both executable and plugin on posix too, so unset it after the executable so that the plugin doesn't end up with a 2nd copy of things on posix. https://reviews.llvm.org/D47082 llvm-svn: 332796
* use standard llvm cmake formatting for targets defined in plugin testsNico Weber2018-05-181-2/+6
| | | | llvm-svn: 332709
* Give shared modules in unittests the platform-native extension, make ↵Nico Weber2018-05-162-2/+3
| | | | | | | | | | | | | | | | | PipSqueak a MODULE As far as I can tell from revision history, there's no good reason to call these files .so instead of .dll in Windows, so use the normal extension. Also change PipSquak from SHARED to MODULE -- it's never passed to target_link_libraries() and only loaded via dlopen(), so MODULE is more appropriate. This makes it possible to delete a workaround for SHARED ldflags being not quite right as well. No intended behavior change. https://reviews.llvm.org/D46898 llvm-svn: 332487
* Rename three cxx files in unittests to cpp.Nico Weber2018-05-152-2/+5
| | | | | | | | | | | | LLVM uses cpp as its C++ file extension, these are the only three cxx file in the monorepo. These files apparently were called to escape a CMake check -- use the LLVM_OPTIONAL_SOURCES mechanism that's meant as an escape for this case instead. No intended behavior change. https://reviews.llvm.org/D46843 llvm-svn: 332368
* Move the TestPlugin project into the Tests folder in CMake.Aaron Ballman2018-05-021-0/+1
| | | | llvm-svn: 331387
* Fix PluginsTests failure on Windows buildbots by enabling it everywhereReid Kleckner2018-04-252-17/+26
| | | | | | | | | | | lit is picking up a stale executable in the unittests tree, which is failing on Windows. To simplify the CMake and avoid problems like this in the future, now we always compile the test, but the test exits successfully when plugins are not enabled. llvm-svn: 330867
* Avoid a warning on pointer casting, NFCGabor Buella2018-04-251-1/+3
| | | | | | | | | | Reviewers: philip.pfaffe Reviewed By: philip.pfaffe Differential Revision: https://reviews.llvm.org/D46012 llvm-svn: 330817
* [Unittests] Fix plugins testMikhail Maltsev2018-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: Currently the PluginsTests.LoadPlugin unit test is failing in LLVM configurations that have LLVM_EXPORT_SYMBOLS_FOR_PLUGINS enabled because the EnableABIBreakingChecks symbol is missing. This patch fixes the issue by linking some additional libraries to the test plugin if LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is enabled. Reviewers: philip.pfaffe Reviewed By: philip.pfaffe Subscribers: mgorny, llvm-commits, rogfer01 Differential Revision: https://reviews.llvm.org/D45811 llvm-svn: 330329
* Revert "Followup for r329293: Temporarily disable the breaking test on windows."Philip Pfaffe2018-04-071-2/+1
| | | | | | This reverts commit r329393 / b52ba35e7759cd4002221be1dbb63ec80fde21ec. llvm-svn: 329514
* Followup for r329293: Temporarily disable the breaking test on windows.Philip Pfaffe2018-04-061-1/+2
| | | | | | | This test is failing on windows bots. Disable it temporarily to unbreak the windows bots. llvm-svn: 329393
* Another fix for r329293: Unbreak the windows botsPhilip Pfaffe2018-04-051-13/+20
| | | | | | | Only build the unittest if plugins are enabled. Link components into the TestPlugin on windows and cygwin. llvm-svn: 329318
* Fix r329293: Add a missing CMake dependencyPhilip Pfaffe2018-04-051-0/+1
| | | | | | | The unittest plugin indirectly includes Attributes.gen, so make sure its target depends on the appropriate tablegen target. llvm-svn: 329308
* Re-land r329273: [Plugins] Add a slim plugin API to work together with the ↵Philip Pfaffe2018-04-054-0/+112
| | | | | | | | | new PM Fix unittest: Do not link LLVM into the test plugin. Additionally, remove an unrelated change that slipped in in r329273. llvm-svn: 329293
* Revert "[Plugins] Add a slim plugin API to work together with the new PM"Philip Pfaffe2018-04-054-115/+0
| | | | | | This reverts commit ecf3ba1ab45edb1b0fadce716a7facf50dca4fbb/r329273. llvm-svn: 329276
* [Plugins] Add a slim plugin API to work together with the new PMPhilip Pfaffe2018-04-054-0/+115
Summary: Add a new plugin API. This closes the gap between pass registration and out-of-tree passes for the new PassManager. Unlike with the existing API, interaction with a plugin is always initiated from the tools perspective. I.e., when a plugin is loaded, it resolves and calls a well-known symbol `llvmGetPassPluginInfo` to obtain details about the plugin. The fundamental motivation is to get rid of as many global constructors as possible. The API exposed by the plugin info is kept intentionally minimal. Reviewers: chandlerc Reviewed By: chandlerc Subscribers: bollu, grosser, lksbhm, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D35258 llvm-svn: 329273
OpenPOWER on IntegriCloud