mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
For PR872:
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
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
; folded completely away if possible. This is a very common case, so it should
|
||||
; be efficient.
|
||||
;
|
||||
; RUN: analyze %s -tddatastructure
|
||||
; RUN: opt -analyze %s -tddatastructure
|
||||
;
|
||||
implementation
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;
|
||||
; RUN: analyze %s -tddatastructure
|
||||
; RUN: opt -analyze %s -tddatastructure
|
||||
%crazy = type [2 x { [2 x sbyte], short } ]
|
||||
|
||||
implementation
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; This file contains a list of situations where node folding should happen...
|
||||
;
|
||||
; RUN: analyze %s -tddatastructure
|
||||
; RUN: opt -analyze %s -tddatastructure
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; very simple test
|
||||
;
|
||||
; RUN: analyze %s -tddatastructure
|
||||
; RUN: opt -analyze %s -tddatastructure
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;
|
||||
; RUN: analyze %s -tddatastructure
|
||||
; RUN: opt -analyze %s -tddatastructure
|
||||
|
||||
%str = type { int*, int* }
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; This file contains a list of cases where node folding should NOT happen
|
||||
;
|
||||
; RUN: analyze %s -tddatastructure
|
||||
; RUN: opt -analyze %s -tddatastructure
|
||||
;
|
||||
|
||||
implementation
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;
|
||||
; RUN: analyze %s -tddatastructure
|
||||
; RUN: opt -analyze %s -tddatastructure
|
||||
|
||||
%G = global int 2 ; <int*> [#uses=1]
|
||||
%H = global int* null
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;
|
||||
; RUN: analyze %s -tddatastructure
|
||||
; RUN: opt -analyze %s -tddatastructure
|
||||
|
||||
int* %test1(int *%A) {
|
||||
%R = getelementptr int* %A, long 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; A test for "physical subtyping" used in some C programs...
|
||||
;
|
||||
; RUN: analyze %s -tddatastructure
|
||||
; RUN: opt -analyze %s -tddatastructure
|
||||
;
|
||||
%ST = type { int, int* } ; "Subtype"
|
||||
%DT = type { int, int*, int } ; "derived type"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: analyze %s -tddatastructure
|
||||
; RUN: opt -analyze %s -tddatastructure
|
||||
|
||||
implementation ; Functions:
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: analyze %s -tddatastructure
|
||||
; RUN: opt -analyze %s -tddatastructure
|
||||
|
||||
void %foo(int* %X) {
|
||||
store int 4, int* %X
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: analyze %s -tddatastructure
|
||||
; RUN: opt -analyze %s -tddatastructure
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: analyze %s -tddatastructure
|
||||
; RUN: opt -analyze %s -tddatastructure
|
||||
|
||||
%str = type { int, int* }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user