Let llc and opt override "-target-cpu" and "-target-features" via command line
authorAkira Hatanaka <ahatanaka@apple.com>
Wed, 6 May 2015 23:54:14 +0000 (23:54 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Wed, 6 May 2015 23:54:14 +0000 (23:54 +0000)
commite6f0494cd8d8d97d5fb70e2687125fdac2e3c434
treed19492ad5129ec2ad672e6dc5d458d329c51e2f4
parentd9fd44e97ae91e8499cebb0d841fd1e9080227a6
Let llc and opt override "-target-cpu" and "-target-features" via command line
options.

This commit fixes a bug in llc and opt where "-mcpu" and "-mattr" wouldn't
override function attributes "-target-cpu" and "-target-features" in the IR.

Differential Revision: http://reviews.llvm.org/D9537

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236677 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/CommandFlags.h
include/llvm/IR/Function.h
lib/IR/Function.cpp
test/CodeGen/X86/llc-override-mcpu-mattr.ll [new file with mode: 0644]
test/Other/opt-override-mcpu-mattr.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/call.ll
tools/llc/llc.cpp
tools/opt/opt.cpp