aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-09-10[profcheck] Require `unknown` metadata have an origin parameter (#157594)Mircea Trofin1-1/+1
Rather than passes using `!prof = !{!”unknown”}`​for cases where don’t have enough information to emit profile values, this patch captures the pass (or some other information) that can help diagnostics - i.e. `!{!”unknown”, !”some-pass-name”}`​. For example, suppose we emitted a `select`​ with the unknown metadata, and, later, end up needing to lower that to a conditional branch. If we observe (via sample profiling, for example) that the branch is biased and would have benefitted from a valid profile, the extra information can help speed up debugging. We can also (in a subsequent pass) generate optimization remarks about such lowered selects, with a similar aim - identify patterns lowering to `select`​ that may be worth some extra investment in extracting a more precise profile.
2025-09-08[WPD] set the branch funnel function entry count (#155657)Mircea Trofin1-9/+41
We can compute the entry count of branch funnel functions, and potentially avoid them being deemed cold (also, keeping profile information coherent is always good for performance) Issue #147390
2025-09-05[LLD][COFF] Add more `--time-trace` tags for ThinLTO linking (#156471)Alexandre Ganea1-0/+2
In order to better see what's going on during ThinLTO linking, this PR adds more profile tags when using `--time-trace` on a `lld-link.exe` invocation. After PR, linking `clang.exe`: <img width="3839" height="2026" alt="Capture d’écran 2025-09-02 082021" src="https://github.com/user-attachments/assets/bf0c85ba-2f85-4bbf-a5c1-800039b56910" /> Linking a custom (Unreal Engine game) binary gives a completly different picture, probably because of using Unity files, and the sheer amount of input files (here, providing over 60 GB of .OBJs/.LIBs). <img width="1940" height="1008" alt="Capture d’écran 2025-09-02 102048" src="https://github.com/user-attachments/assets/60b28630-7995-45ce-9e8c-13f3cb5312e0" />
2025-08-26[NFC][WPD] Pass the module analysis manager instead of lambdas (#155338)Mircea Trofin1-35/+19
Easier to evolve - if we need more analyses, it becomes clumsy to keep passing around lambdas.
2025-08-26[NFC][WPD] code style fixes (#155454)Mircea Trofin1-48/+48
2025-06-20[WholeProgramDevirt] Add check for AvailableExternal and give up ↵Tianle Liu1-0/+16
icall.branch.funnel (#143468) When a customer class inherits from a libc++ class, and is built with "-flto -fwhole-program-vtables -static-libstdc++ \ -Wl,-plugin-opt=-whole-program-visibility", the libc++ class's vtable is available_externally, meanwhile the customer class vtable is private. And both of them are !vcall_visibility == Linkage Unit. In this case, icall.branch.funnel might be generated. But the icall.branch.funnel would cause crash in LowerTypeTests because available_externally Global_Object's GlobalTypeMember would not be saved and finally leads to a NULL GlobalTypeMember which causes a crash. Even saving the available_externally GO's GlobalTypeMember so that it is not NULL to avoid the crash in LowerTypeTests, it still will crash in SelectionDAGBuilder or Verifier, because operands linkage type consistency check of icall.branch.funnel can not pass. So any one of available externally vtable would stop to generate icall.branch.funnel. This patch fixes FullLTO mode and split-LTO-unit ThinLTO mode.
2025-06-13WholeProgramDevirt: Fix importing in llvm.type.checked.load case.Peter Collingbourne1-21/+18
We were clearing SummaryTypeCheckedLoadUsers to prevent devirtualized llvm.type.checked.load calls from being converted to llvm.type.test, which meant that AddCalls would not see them in the list of callsites and they would not get imported. Fix that by not clearing SummaryTypeCheckedLoadUsers so that the list survives to AddCalls and using AllCallSitesDevirted to control whether to convert them instead. Reviewers: teresajohnson Reviewed By: teresajohnson Pull Request: https://github.com/llvm/llvm-project/pull/144019
2025-06-04[llvm] Use ABI instead of preferred alignment for const prop checks (#142500)PiJoules1-1/+1
We'd hit an assertion checking proper alignment for an i8 when building chromium because we used the prefered alignment (which is 4 bytes) instead of the ABI alignment (which is 1 byte). The ABI alignment should be used because that's the actual alignment needed to load a constant from the vtable. This also updates the two `virtual-const-prop-small-alignment-*` to explicitly give ABI alignments for i64s.
2025-05-27IR: Make Module::getOrInsertGlobal() return a GlobalVariable.Peter Collingbourne1-5/+3
After pointer element types were removed this function can only return a GlobalVariable, so reflect that in the type and comments and clean up callers. Reviewers: nikic Reviewed By: nikic Pull Request: https://github.com/llvm/llvm-project/pull/141323
2025-05-15[llvm] Ensure propagated constants in the vtable are aligned (#136630)PiJoules1-1/+36
It's possible for virtual constant propagation in whole program devirtualization to create unaligned loads. We originally saw this with 4-byte aligned relative vtables where we could store 8-byte values before/after the vtable. But since the vtable is 4-byte aligned and we unconditionally do an 8-byte load, we can't guarantee that the stored constant will always be aligned to 8 bytes. We can also see this with normal vtables whenever a 1-byte char is stored in the vtable because the offset calculation for the GEP doesn't take into account the original vtable alignment. This patch introduces two changes to virtual constant propagation: 1. Do not propagate constants whose preferred alignment is larger than the vtable alignment. This is required because if the constants are stored in the vtable, we can only guarantee the constant will be stored at an address at most aligned to the vtable's alignment. 2. Round up the offset used in the GEP before the load to ensure it's at an address suitably aligned such that we can load from it. This patch updates tests to reflect this alignment change and adds some cases for relative vtables.
2025-04-28Clean up external users of GlobalValue::getGUID(StringRef) (#129644)Owen Rodley1-6/+9
See https://discourse.llvm.org/t/rfc-keep-globalvalue-guids-stable/84801 for context. This is a non-functional change which just changes the interface of GlobalValue, in preparation for future functional changes. This part touches a fair few users, so is split out for ease of review. Future changes to the GlobalValue implementation can then be focused purely on that class. This does the following: * Rename GlobalValue::getGUID(StringRef) to getGUIDAssumingExternalLinkage. This is simply making explicit at the callsite what is currently implicit. * Where possible, migrate users to directly calling getGUID on a GlobalValue instance. * Otherwise, where possible, have them call the newly renamed getGUIDAssumingExternalLinkage, to make the assumption explicit. There are a few cases where neither of the above are possible, as the caller saves and reconstructs the necessary information to compute the GUID themselves. We want to migrate these callers eventually, but for this first step we leave them be.
2025-03-13[llvm] Match llvm.type.checked.load.relative semantics to llvm.load.r… ↵PiJoules1-6/+3
(#129583) …elative The semantics of `llvm.type.checked.load.relative` seem to be a little different from that of `llvm.load.relative`. It looks like the semantics for `llvm.type.checked.load.relative` is `ptr + offset + *(ptr + offset)` whereas the semantics for `llvm.load.relative` is `ptr + *(ptr + offset)`. That is, the offset for the former is added to the offset address whereas the later has the offset added to the original pointer. It really feels like the checked intrinsic was meant to match the semantics of the non-checked intrinsic, but I think for all cases the checked intrinsic is used (swift being the only use I know of), the calculation just happens to be the same because swift always uses an offset of zero. Likewise, all llvm tests for this intrinsic happen to use an offset of zero. Relative vtables in clang happens to be the first time where we're using this intrinsic and using it with non-zero values. This updates the semantics of the checked intrinsic to match the non-checked one. Effectively this shouldn't change any codegen by any users of this since all current users seem to use a zero offset. This PR also updates some tests with non-zero offsets.
2025-01-23[WPD]Provide branch weight for checking mode. (#124084)Mingming Liu1-2/+3
Checking mode aims to help diagnose and confirm undefined behavior. In most cases, source code don't cast pointers between unrelated types for virtual calls, so we expect direct calls in the frequent branch and debug trap in the unlikely branch. This way, the overhead of checking mode is not higher than an indirect call promotion for a hot callsite as long as the callsite doesn't run the debug trap branch.
2025-01-23[IR] Replace of PointerType::getUnqual(Type) with opaque version (NFC) (#123909)Mats Jun Larsen1-6/+4
Follow up to https://github.com/llvm/llvm-project/issues/123569
2024-11-13[WPD]Regard unreachable function as a possible devirtualizable target (#115668)Mingming Liu1-0/+27
https://reviews.llvm.org/D115492 skips unreachable functions and potentially allows more static de-virtualizations. The motivation is to ignore virtual deleting destructor of abstract class (e.g., `Base::~Base()` in https://gcc.godbolt.org/z/dWMsdT9Kz). * Note WPD already handles most pure virtual functions (like `Base::x()` in the godbolt example above), which becomes a `__cxa_pure_virtual` in the vtable slot. This PR proposes to undo the change, because it turns out there are other unreachable functions that a general program wants to run and fail intentionally, with `LOG(FATAL)` or `CHECK` [1] for example. While many real-world applications are encouraged to check-fail sparingly, they are allowed to do so on critical errors (e.g., misconfiguration or bug is detected during server startup). * Implementation-wise, this PR keeps the one-bit 'unreachable' state in bitcode and updates WPD analysis. https://gcc.godbolt.org/z/T1aMhczYr is a minimum reproducible example extracted from unit test. `Base::func` is a one-liner of `LOG(FATAL) << "message"`, and lowered to one basic block ending with `unreachable`. A real-world program is _allowed_ to invoke Base::func to terminate the program as a way to report errors (in server initialization stage for example), even if errors on the serving path should be handled more gracefully. [1] https://abseil.io/docs/cpp/guides/logging#CHECK and https://abseil.io/docs/cpp/guides/logging#configuration-and-flags
2024-11-03[IPO] Remove unused includes (NFC) (#114716)Kazu Hirata1-1/+0
Identified with misc-include-cleaner.
2024-10-23[WPD][ThinLTO]Add cutoff option for WPD (#113383)Mingming Liu1-0/+17
This option applies for _import_ WPD (i.e., when `DevirtModule` pass de-virtualizes according to an imported summary, in ThinLTO backend pipeline). It's meant for debugging (e.g., bisection).
2024-10-16[LLVM] Add `Intrinsic::getDeclarationIfExists` (#112428)Rahul Joshi1-6/+7
Add `Intrinsic::getDeclarationIfExists` to lookup an existing declaration of an intrinsic in a `Module`.
2024-10-11[NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (#111752)Rahul Joshi1-5/+7
Rename the function to reflect its correct behavior and to be consistent with `Module::getOrInsertFunction`. This is also in preparation of adding a new `Intrinsic::getDeclaration` that will have behavior similar to `Module::getFunction` (i.e, just lookup, no creation).
2024-09-19[LLVM] Use {} instead of std::nullopt to initialize empty ArrayRef (#109133)Jay Foad1-2/+2
It is almost always simpler to use {} instead of std::nullopt to initialize an empty ArrayRef. This patch changes all occurrences I could find in LLVM itself. In future the ArrayRef(std::nullopt_t) constructor could be deprecated or removed.
2024-06-30[llvm][Transforms] Avoid 'raw_string_ostream::str' (NFC)Youngsuk Kim1-1/+1
Since `raw_string_ostream` doesn't own the string buffer, it is desirable (in terms of memory safety) for users to directly reference the string buffer rather than use `raw_string_ostream::str()`. Work towards TODO comment to remove `raw_string_ostream::str()`.
2024-06-28[IR] Add getDataLayout() helpers to Function and GlobalValue (#96919)Nikita Popov1-1/+1
Similar to https://github.com/llvm/llvm-project/pull/96902, this adds `getDataLayout()` helpers to Function and GlobalValue, replacing the current `getParent()->getDataLayout()` pattern.
2024-05-29[WPD] Directly create geteleementptr inbounds (NFCI)Nikita Popov1-1/+1
We know that this GEP is inbounds, so make it explicit. NFCI because constant expression construction already infers this.
2024-04-19[NFCI][sanitizers][metadata] Exctract create{Unlikely,Likely}BranchWeights ↵Vitaly Buka1-2/+1
(#89464) We have a lot of repeated code with random constants. Particular values are not important, the one just needs to be bigger then another. UR_NONTAKEN_WEIGHT is selected as it's the most common one.
2024-03-05[NFC][RemoveDIs] Insert instruction using iterators in Transforms/Jeremy Morse1-4/+4
As part of the RemoveDIs project we need LLVM to insert instructions using iterators wherever possible, so that the iterators can carry a bit of debug-info. This commit implements some of that by updating the contents of llvm/lib/Transforms/Utils to always use iterator-versions of instruction constructors. There are two general flavours of update: * Almost all call-sites just call getIterator on an instruction * Several make use of an existing iterator (scenarios where the code is actually significant for debug-info) The underlying logic is that any call to getFirstInsertionPt or similar APIs that identify the start of a block need to have that iterator passed directly to the insertion function, without being converted to a bare Instruction pointer along the way. Noteworthy changes: * FindInsertedValue now takes an optional iterator rather than an instruction pointer, as we need to always insert with iterators, * I've added a few iterator-taking versions of some value-tracking and DomTree methods -- they just unwrap the iterator. These are purely convenience methods to avoid extra syntax in some passes. * A few calls to getNextNode become std::next instead (to keep in the theme of using iterators for positions), * SeparateConstOffsetFromGEP has it's insertion-position field changed. Noteworthy because it's not a purely localised spelling change. All this should be NFC.
2024-02-06[CallPromotionUtil] See through function alias when devirtualizing a virtual ↵Mingming Liu1-11/+4
call on an alloca. (#80736) - Extract utility function from `DevirtModule::tryFindVirtualCallTargets` [1], which sees through an alias to a function. Call this utility function in the WPD callsite. - For type profiling work, this helper function will be used by indirect-call-promotion pass to find the function pointer at a specified vtable offset (an example in [2]) [1] https://github.com/llvm/llvm-project/blob/b99163fe8feeacba7797d5479bbcd5d8f327dd2d/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp#L1069-L1082 [2] https://github.com/minglotus-6/llvm-project/blob/77a0ef12de82d11f448f7f9de6f2dcf87d9b74af/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp#L347
2024-01-12[IRBuilder] Add CreatePtrAdd() method (NFC) (#77582)Nikita Popov1-3/+3
This abstracts over the common pattern of creating a gep with i8 element type.
2023-12-06[ThinLTO] Add tail call flag to call edges in summary (#74043)Teresa Johnson1-1/+2
This adds support for a HasTailCall flag on function call edges in the ThinLTO summary. It is intended for use in aiding discovery of missing frames from tail calls in profiled call stacks for MemProf of profiled binaries that did not disable tail call elimination. A follow on change will add the use of this new flag during MemProf context disambiguation. The new flag is encoded in the bitcode along with either the hotness flag from the profile, or the relative block frequency under the -write-relbf-to-summary flag when there is no profile data. Because we now will always have some additional call edge information, I have removed the non-profile function summary record format, and we simply encode the tail call flag along with a hotness type of none when there is no profile information or relative block frequency. The change of record format and name caused most of the test case changes. I have added explicit testing of generation of the new tail call flag into the bitcode and IR assembly format as part of the changes to llvm/test/Bitcode/thinlto-function-summary-refgraph.ll. I have also added round trip testing through assembly and bitcode to llvm/test/Assembler/thinlto-summary.ll.
2023-11-06[Transforms] Use StringRef::starts_with/ends_with instead of ↵Simon Pilgrim1-1/+1
startswith/endswith. NFC. startswith/endswith wrap starts_with/ends_with and will eventually go away (to more closely match string_view)
2023-11-06[IPO] Remove unnecessary bitcasts (NFC)Nikita Popov1-2/+1
2023-10-22[llvm] Stop including llvm/ADT/iterator_range.h (NFC)Kazu Hirata1-1/+0
Identified with misc-include-cleaner.
2023-09-18[WPD][LLD] Add option to validate RTTI is enabled on all native types and ↵modimo1-5/+71
prevent devirtualization on types with native RTTI Discussion about this approach: https://discourse.llvm.org/t/rfc-safer-whole-program-class-hierarchy-analysis/65144/18 When enabling WPD in an environment where native binaries are present, types we want to optimize can be derived from inside these native files and devirtualizing them can lead to correctness issues. RTTI can be used as a way to determine all such types in native files and exclude them from WPD providing a safe checked way to enable WPD. The approach is: 1. In the linker, identify if RTTI is available for all native types. If not, under `--lto-validate-all-vtables-have-type-infos` `--lto-whole-program-visibility` is automatically disabled. This is done by examining all .symtab symbols in object files and .dynsym symbols in DSOs for vtable (_ZTV) and typeinfo (_ZTI) symbols and ensuring there's always a match for every vtable symbol. 2. During thinlink, if `--lto-validate-all-vtables-have-type-infos` is set and RTTI is available for all native types, identify all typename (_ZTS) symbols via their corresponding typeinfo (_ZTI) symbols that are used natively or outside of our summary and exclude them from WPD. Testing: ninja check-all large Meta service that uses boost, glog and libstdc++.so runs successfully with WPD via --lto-whole-program-visibility. Previously, native types in boost caused incorrect devirtualization that led to crashes. Reviewed By: MaskRay, tejohnson Differential Revision: https://reviews.llvm.org/D155659
2023-09-17[WholeProgramDevirt] Use llvm:: qualifier to implement declared functions. NFCFangrui Song1-13/+9
2023-09-02[llvm] Use range-based for loops (NFC)Kazu Hirata1-4/+4
2023-08-03[llvm] Drop some typed pointer handling/bitcastsBjorn Pettersson1-8/+4
Differential Revision: https://reviews.llvm.org/D157016
2023-08-02Stop using legacy helpers indicating typed pointer types. NFCBjorn Pettersson1-1/+1
Since we no longer support typed LLVM IR pointer types, the code can be simplified into for example using PointerType::get directly instead of using Type::getInt8PtrTy and Type::getInt32PtrTy etc. Differential Revision: https://reviews.llvm.org/D156733
2023-06-29Add a type_checked_load_relative to support relative function pointer tablesArnold Schwaighofer1-5/+26
This adds a type_checked_load_relative intrinsic whose semantics it is to load a relative function pointer. A relative function pointer is a pointer to a 32bit value that when added to its address yields the address of the function. Differential Revision: https://reviews.llvm.org/D143204
2023-06-29WholeProgramDevirt: Fix call target propagation for ptrauth architecturesArnold Schwaighofer1-0/+15
We can't have a call with a constant target with a ptrauth bundle. Remove the ptrauth bundle operand in such a case rdar://105696396 Differential Revision: https://reviews.llvm.org/D144581
2023-06-28[llvm] Replace uses of Type::getPointerTo (NFC)Youngsuk Kim1-2/+1
Partial progress towards removing in-tree uses of `Type::getPointerTo`, before we can deprecate the API. If the API is used solely to support an unnecessary bitcast, get rid of the bitcast as well. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D153933
2023-04-17Remove several no longer needed includes. NFCIBjorn Pettersson1-3/+0
Mostly removing includes of InitializePasses.h and Pass.h in passes that no longer has support for the legacy PM.
2023-03-26Revert "[llvm] Teach whole program devirtualization about relative vtables"Leonard Chan1-1/+1
This reverts commit db288184765c0b4010060ebea1f6de3ac1f66445. Reverting since it broke our lto builders reported by fxbug.dev/123807.
2023-03-23[llvm] Handle duplicate call bases when applying branch funnelingLeonard Chan1-2/+17
It's possible to segfault in `DevirtModule::applyICallBranchFunnel` when attempting to call `getCaller` on a call base that was erased in a prior iteration. This can occur when attempting to find devirtualizable calls via `findDevirtualizableCallsForTypeTest` if the vtable passed to llvm.type.test is a global and not a local. The function works by taking the first argument of the llvm.type.test call (which is a vtable), iterating through all uses of it, and adding any relevant all uses that are calls associated with that intrinsic call to a vector. For most cases where the vtable is actually a *local*, this wouldn't be an issue. Take for example: ``` define i32 @fn(ptr %obj) #0 { %vtable = load ptr, ptr %obj %p = call i1 @llvm.type.test(ptr %vtable, metadata !"typeid2") call void @llvm.assume(i1 %p) %fptr = load ptr, ptr %vtable %result = call i32 %fptr(ptr %obj, i32 1) ret i32 %result } ``` `findDevirtualizableCallsForTypeTest` will check the call base ` %result = call i32 %fptr(ptr %obj, i32 1)`, find that it is associated with a virtualizable call from `%vtable`, find all loads for `%vtable`, and add any instances those load results are called into a vector. Now consider the case where instead `%vtable` was the global itself rather than a local: ``` define i32 @fn(ptr %obj) #0 { %p = call i1 @llvm.type.test(ptr @vtable, metadata !"typeid2") call void @llvm.assume(i1 %p) %fptr = load ptr, ptr @vtable %result = call i32 %fptr(ptr %obj, i32 1) ret i32 %result } ``` `findDevirtualizableCallsForTypeTest` should work normally and add one unique call instance to a vector. However, if there are multiple instances where this same global is used for llvm.type.test, like with: ``` define i32 @fn(ptr %obj) #0 { %p = call i1 @llvm.type.test(ptr @vtable, metadata !"typeid2") call void @llvm.assume(i1 %p) %fptr = load ptr, ptr @vtable %result = call i32 %fptr(ptr %obj, i32 1) ret i32 %result } define i32 @fn2(ptr %obj) #0 { %p = call i1 @llvm.type.test(ptr @vtable, metadata !"typeid2") call void @llvm.assume(i1 %p) %fptr = load ptr, ptr @vtable %result = call i32 %fptr(ptr %obj, i32 1) ret i32 %result } ``` Then each call base `%result = call i32 %fptr(ptr %obj, i32 1)` will be added to the vector twice. This is because for either call base `%result = call i32 %fptr(ptr %obj, i32 1) `, we determine it is associated with a virtualizable call from `@vtable`, and then we iterate through all the uses of `@vtable`, which is used across multiple functions. So when scanning the first `%result = call i32 %fptr(ptr %obj, i32 1)`, then both call bases will be added to the vector, but when scanning the second one, both call bases are added again, resulting in duplicate call bases in the CSInfo.CallSites vector. Note this is actually accounted for in every other instance WPD iterates over CallSites. What everything else does is actually add the call base to the `OptimizedCalls` set and just check if it's already in the set. We can't reuse that particular set since it serves a different purpose marking which calls where devirtualized which `applyICallBranchFunnel` explicitly says it doesn't. For this fix, we can just account for duplicates with a map and do the actual replacements afterwards by iterating over the map. Differential Revision: https://reviews.llvm.org/D146267
2023-03-15[WPD] Fix PreservedAnalyses value after runForTesting()Arthur Eubanks1-1/+1
2023-03-14[Transforms] Use *{Set,Map}::contains (NFC)Kazu Hirata1-2/+1
2023-02-23[llvm] Teach whole program devirtualization about relative vtablesLeonard Chan1-1/+1
Prior to this patch, WPD was not acting on relative-vtables in C++. This involves teaching WPD about these things: - llvm.load.relative which is how relative-vtables are indexed (instead of GEP) - dso_local_equivalent which is used in the vtable itself when taking the offset between a virtual function and vtable - Update llvm/test/ThinLTO/X86/devirt.ll to use opaque pointers and add equivalent tests for RV Differential Revision: https://reviews.llvm.org/D134320
2023-02-23[LTO/WPD] Allow devirtualization to function alias in vtableTeresa Johnson1-17/+55
Follow on to D144209 to support single implementation devirtualization for Regular LTO when the vtable holds a function alias. For now I have prevented other optimizations performed in regular LTO that need to analyze the contents of the function target when the vtable holds an alias, as I'm not sure they are always correct to perform in that case. Differential Revision: https://reviews.llvm.org/D144270
2023-02-16[ThinLTO/WPD] Handle function alias in vtable correctlyTeresa Johnson1-3/+5
We were not summarizing a function alias in the vtable, leading to incorrect WPD in some cases, and missing WPD in others. Specifically, we would end up ignoring function aliases as they aren't summarized, so we could incorrectly devirtualize if there was a single other non-alias function in a compatible vtable. And if there was only one implementation, but it was an alias, we would not be able to identify and perform the single implementation devirtualization. Handling the alias summary correctly also required fixing the handling in mustBeUnreachableFunction, so that it is not incorrectly ignored. Regular LTO is conservatively correct because it will skip devirtualizing when any pointer within a vtable is not a function. However, it needs additional work to be able to take advantage of function alias within the vtable that is in fact the only implementation. For that reason, the Regular LTO testing in the second test case is currently disabled, and will be enabled along with a follow on enhancement fix for Regular LTO WPD. Differential Revision: https://reviews.llvm.org/D144209
2023-02-14Recommit: [NFC][IR] Make Module::getGlobalList() privateVasileios Porpodas1-1/+1
This reverts commit cb5f239363a3c94db5425c105fcd45e77d2a16a9.
2023-02-14Revert "[NFC][IR] Make Module::getGlobalList() private"Vasileios Porpodas1-1/+1
This reverts commit ed3e3ee9e30dfbffd2170a770a49b36a7f444916.
2023-02-14[NFC][IR] Make Module::getGlobalList() privateVasileios Porpodas1-1/+1
This patch adds several missing GlobalList modifier functions, like removeGlobalVariable(), eraseGlobalVariable() and insertGlobalVariable(). There is no longer need to access the list directly so it also makes getGlobalList() private. Differential Revision: https://reviews.llvm.org/D144027