mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-20 09:30:43 +00:00
fd90dd5d55
Shrinkify LLVM's footprint by removing the analyze tool and moving its functionality into the opt tool. THis eliminates one of the largest tools from LLVM and doesn't make opt much bigger because it already included most of the analysis passes. To get the old analyze functionality pass the -analyze option to opt. Note that the integeration here is dead simple. The "main" of analyze was just copied to opt and invoked if the -analyze option was given. There may be opportunities for further integration such as removing the distinction between transform passes and analysis passes. To use the analysis functionality, if you previously did this: analyze $FNAME -domset -disable-verify you would now do this: opt -analyze $FNAME -domset -disable-verify Pretty simple. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29762 91177308-0d34-0410-b5e6-96231b3b80d8
36 lines
622 B
LLVM
36 lines
622 B
LLVM
;
|
|
; RUN: opt -analyze %s -tddatastructure
|
|
|
|
%G = global int 2 ; <int*> [#uses=1]
|
|
%H = global int* null
|
|
|
|
%I = global int** null
|
|
%J = global int** null
|
|
|
|
implementation ; Functions:
|
|
|
|
void %foo1() {
|
|
store int* %G, int** %H
|
|
store int** %H, int ***%I
|
|
ret void
|
|
}
|
|
|
|
void %foo2() { ; No predecessors!
|
|
store int 7, int* %G
|
|
store int** %H, int ***%J
|
|
ret void
|
|
}
|
|
|
|
void %test(bool %cond) {
|
|
; <label>:0 ; No predecessors!
|
|
br bool %cond, label %call, label %F
|
|
|
|
F: ; preds = %0
|
|
br label %call
|
|
|
|
call: ; preds = %F, %0
|
|
%Fn = phi void ()* [ %foo2, %F ], [ %foo1, %0 ] ; <void ()*> [#uses=1]
|
|
call void %Fn()
|
|
ret void
|
|
}
|